Webhooks

Modified on Thu, 5 Nov at 12:06 PM

How webhooks work

A webhook lets your own system know when something changes in Project Flow. When it happens, Project Flow sends an HTTP POST to one or more URLs you choose.

  • A notice, not the data. The message says what happened and gives the IDs of what changed. To get the data, your system calls the Moment API with those IDs (see the article Moment API Key).
  • One integration per webhook. Each webhook below is its own integration, with its own URLs and its own log. Turn on only the ones you need.
  • Typical uses: registering an invoice in your own system as soon as it is finalized, or keeping projects and customers up to date in a CRM or reporting system.



Available webhooks

Webhook (EN / NB)Sent whenEvents
Webhook - projects / Webhook - prosjekterA project is created or savedCREATE_NEW, UPDATE_EXISTING
Webhook - project membersA member is added to a project's team, changed or removedCREATE_NEW, UPDATE_EXISTING, DELETE
Webhook - customers / Webhook - kunderA customer is created or savedCREATE_NEW, UPDATE_EXISTING
Webhook - invoices / Webhook - fakturaerAn invoice or credit note is finalizedUPDATE_EXISTING
Webhook - claims / Webhook - reiseregningerA travel or expense claim is approved, rejected or paid outUPDATE_EXISTING
Webhook — offers changed / Webhook — tilbud endretAn offer is savedUPDATE_EXISTING
Webhook - offers decided / Webhook - tilbud avgjortAn offer is accepted or declined, and when an accepted or declined offer changesCREATE_NEW, UPDATE_EXISTING, DELETE

The details for each webhook are under When each webhook is sent below.



Set up a webhook

  1. Go to Setup → Settings → Integrations (Oppsett → Innstillinger → Integrasjoner). You need administrator access.
  2. Click + Create integration and choose the webhook, for example Webhook - invoices.
  3. In Webhook URL (Webhook-URL), enter the URL that should receive the messages. You can add several URLs.
  4. Tick Enabled and save.
  • Project Flow checks the URL when you save. It tests that it can connect to the server. If not, you see "Invalid Webhook URL" or "Cannot connect to …", and the integration isn't saved. No message is sent during the test.
  • Use the exact final URL, with https://. Project Flow doesn't follow redirects, for example from http to https.
  • Project Flow plan. Webhooks aren't available on the Start plan. If a webhook has a monthly cost, the form shows it before you save.
  • No e-mail on errors. The fields Co-workers to notify and Emails to notify don't send anything for webhooks. Failed deliveries are only shown in the log.

Testing. Point the webhook to a temporary request inspection service, then make a test change in Project Flow and look at what is sent.



What Project Flow sends

Each message is an HTTP POST with a JSON body. It always contains:

  • event: CREATE_NEW, UPDATE_EXISTING or DELETE.
  • changedDateTime: when the change was saved in Project Flow, in UTC.
  • One object with the IDs of what changed.

Example: an invoice is finalized

{
  "event": "UPDATE_EXISTING",
  "changedDateTime": "2026-10-08T12:34:56Z",
  "invoice": {
    "id": 106939080,
    "invoiceNumber": 1,
    "customer": { "id": 62788973, "customerNumber": "10001" },
    "project": { "id": 62788980, "projectNumber": "1" }
  }
}
WebhookObjectFields
Projectsprojectid, projectNumber, customer (id, customerNumber)
Project membersprojectMembershipid, roleId, roleName, userAccountId, project (id, projectNumber, customer)
Customerscustomerid, customerNumber
Invoicesinvoiceid, invoiceNumber, customer (id, customerNumber), project (id, projectNumber)
Claimsclaimid, claimNumber, userAccountId (the co-worker who owns the claim)
Offers (both)offerid, offerNumber, status, title, customerId

Fields without a value are left out. For example, userAccountId is missing for a project member that is only a role without a co-worker.

Fetch the data with the API. For the invoice above:

GET https://app.moment.team/api/1.0/companies/{COMPANYCODE}/invoices/106939080

In the same way, use /projects/{id}, /customers/{id} and so on. The project and customer answers also show who changed them last.



When each webhook is sent

Every save counts. For projects, project members, customers and offers, Project Flow doesn't check which fields changed. Each save sends a message, so your system should fetch the data and compare it with what it already has.


Projects

  • CREATE_NEW when a project is created: by hand, from a template, as a sub-project, through the API or by an integration.
  • UPDATE_EXISTING when a project is saved, also when it is closed or reopened, when many projects are changed at once (one message per project), and when Project Flow updates it for you, for example when the customer's address changes and the project uses the customer's address.
  • Not sent:
    • when a project is deleted;
    • for template projects (a template turned into a normal project is sent as UPDATE_EXISTING);
    • when the project's customer is inactive;
    • when activities (prosjektdeler) change.


Project members

  • Sent when a member is added, changed or removed on the project's Team tab, or through the API. Removing sends DELETE.
  • Not sent when Project Flow adds a member automatically, for example:
    • the person who creates the project;
    • a co-worker added when registering hours on the project;
    • members copied from a template or another project;
    • members synced from a partner company.
  • Deleting a project sends no DELETE for its members.


Customers

  • CREATE_NEW when a customer is created, and UPDATE_EXISTING when it is saved.
  • Only customers. Contacts that aren't marked as customers aren't sent, and neither are inactive customers. The log then shows, for example, "Customer #… was not exported because it is inactive".
  • Not sent when a customer is deleted.


Invoices

  • Sent once, when the invoice is finalized, with UPDATE_EXISTING. This includes invoices finalized many at a time from To be invoiced.
  • Credit notes are sent the same way when they are finalized. The message doesn't say it is a credit note, so fetch the invoice to see its type.
  • Not sent for drafts, when the invoice is sent to the customer, or when a payment is registered.


Claims

  • Sent with UPDATE_EXISTING when the status of a travel or expense claim is changed by approving, rejecting, paying out, or undoing a payout.
  • The status isn't in the message. Fetch the claim to see it.
  • Not sent when a claim is created, edited or deleted.


Offers

  • Webhook — offers changed is sent with UPDATE_EXISTING every time an offer is saved, not only when its status changes. That includes changes Project Flow makes, for example when a project is created from the offer.
  • Webhook - offers decided is sent when an offer is accepted or declined. It is also sent every time an accepted or declined offer is changed afterwards, and with DELETE when one is deleted.
  • Check the status. The decision is in status (accepted or declined). Use it, and the event, to decide what to do.

Changes made in the background. Changes Project Flow makes automatically outside a user's action, for example during scheduled imports from other integrations, may not send a message. If your system must be complete, also run a regular sync through the API.



Delivery

  • Shortly after the save. Messages are sent through a queue right after the change is saved, not while the user waits.
  • One message per change and URL. When many items are changed at once, each item gets its own message. Each URL gets its own copy.
  • Answer within 30 seconds. Reply with a 2xx status as soon as you have received the message, and do the work afterwards.
  • Retries. If your server can't be reached or doesn't answer in time, or answers 429 or 503, Project Flow tries again up to 4 times, after about 1, 2, 4 and 8 seconds.
  • No retry for other errors. Any other error answer, such as 400, 404 or 500, isn't retried.
  • Expect duplicates. A slow answer can make Project Flow send the same message again. Handle the same message twice without problems, for example by always fetching the data and updating it.
  • Order. Messages from one save arrive in order. Across separate saves, use changedDateTime and the fetched data, not the arrival order.



Catch up on missed messages

While a webhook is enabled, Project Flow also stores its events. If your system was down, fetch them through the API:

GET https://app.moment.team/api/1.0/companies/{COMPANYCODE}/webhookEvents?entityClass=Invoice&fromDate=2026-10-01
FilterUse
entityClassThe type: Project, ProjectMembership, Customer, Invoice, ClaimEntity or Offer
fromDate / toDateThe period
webhookEventTypeCREATE_NEW, UPDATE_EXISTING or DELETE
lastUidOnly events after the last event you read
page / sizePaging. The newest events come first.

Each event has an entityId (the ID of the project, invoice and so on), the webhookEventType, the createdDate and the message itself. Events are only stored while the webhook is enabled.



Security

Project Flow doesn't sign the messages, and doesn't send a secret or authentication header. To keep the integration safe:

  • Use HTTPS and a URL that is hard to guess, and don't publish it.
  • Treat the message as a notice. Always fetch the data from the Moment API with your API key. A fake message can then do no more than make your system look up an ID.



Check the log

Go to Company → Logs and choose the webhook's category, for example Webhook - projects:

MessageMeaning
"Successfully posted invoice number …"Your server answered with success.
"Failed to post invoice number … due to connection failure."Project Flow couldn't reach your URL, or it didn't answer in time, even after the retries.
"Failed to post invoice number … due to server error."Your server answered with an error, for example 400, 404 or 500.

Project members. The log entries for Webhook - project members have no category of their own. Search with all categories selected.



Q&A

Q: I created an invoice, but nothing was sent.

A: The invoice webhook is only sent when the invoice is finalized, not for drafts.

Q: I deleted a project or customer, but nothing was sent.

A: Projects and customers have no delete event. Check through the API which ones still exist.

Q: We get many UPDATE_EXISTING messages for the same project or offer.

A: Every save sends a message, also when Project Flow updates it automatically or many items are changed at once. Fetch the data and update your system only if something you use has changed.

Q: A customer wasn't sent.

A: Check that the contact is marked as a customer and isn't inactive. The log for Webhook - customers shows why it wasn't exported.

Q: The log says "Successfully posted", but our system got nothing.

A: Check that the URL is the final address. If it redirects, for example from http to https, the message doesn't reach your system.

Q: We were down for a day. Are the messages lost?

A: They aren't sent again, but you can fetch the events from webhookEvents in the API, and then fetch the data.

Q: Is there a webhook for payments or hours?

A: No. The webhooks above are the only ones available.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article