API reference · v1.0.0

Webhooks

Flavio sends the events of an account to your URL as they happen. Each webhook belongs to one account.

View as Markdown
Base URL
There is no single base URL: each partner works on its own domain, under its own brand, so your customers never see ours. We give you yours when we set you up together. The examples use app.acmeseo.com.
GET /api/accounts/{uuid}/flavio/webhooks

List webhooks

Returns the webhooks of the account, oldest first, each with how its last delivery went. An account has at most 10.

Authentication

  • Authorization header · Bearer JWT

    The JWT of one account (HMAC-SHA256, signed with the API Key), sent as Authorization: Bearer <JWT>. It gives access to that account only: every operation of Flavio Agent, Webhooks, Site data and Keywords, competitors and pages, and updating the account.

Parameters

  • uuid path · stringrequired

    UUID of the Account

Responses

200 OK
json:api
data[].type
"webhook"
data[].id
string

ID of the webhook

data[].attributes

  • url string

    Where Flavio sends the events

    Example: https://hooks.example-builder.com/flavio

  • events string[]

    The types of event it receives. Empty, all of them.

  • secret string

    The key of the signatures. Only in the answer of Create a webhook.

    Example: 3f9c1a7e5b2d4f6081a3c5e7f9b1d3e5a7c9e1f3b5d7f9a1c3e5

  • created_at string

    When it was created (UTC)

    Example: 2026-11-04T11:02:05Z

  • last_delivery_at stringnullable

    When Flavio last tried to send it an event (UTC); null until the first time

    Example: 2026-11-06T04:12:10Z

  • last_status integernullable

    The HTTP status of that try; null when it got no answer, or before the first

    Example: 200

  • last_error stringnullable

    Why that try failed, such as timeout or HTTP 500; null when it worked

    Example: null

  • failing_since stringnullable

    Since when its deliveries fail (UTC); null while the last one worked

    Example: null

403 Forbidden
  • errors object[]
    Child attributes
    • status number

      Numerical status code of the error

      Example: 403

    • title string

      A descriptive message of the error

      Example: Forbidden

404 Not Found
  • errors object[]
    Child attributes
    • status number

      HTTP status

      Example: 404

    • title string

      Error message title

      Example: Not Found

    • detail string

      Error message detail

      Example: The requested account ID was not found

Request

curl https://app.acmeseo.com/api/accounts/{uuid}/flavio/webhooks \
  -H "Authorization: Bearer <JWT>" \
  -H "Accept: application/vnd.marketgoo.api+json"

Response

{
  "data": [
    {
      "type": "webhook",
      "id": "7",
      "attributes": {
        "url": "https://hooks.example-builder.com/flavio",
        "events": [
          "plan.ready",
          "intervention.opened",
          "intervention.resolved"
        ],
        "created_at": "2026-11-04T11:02:05Z",
        "last_delivery_at": "2026-11-06T04:12:10Z",
        "last_status": 200,
        "last_error": null,
        "failing_since": null
      }
    }
  ]
}
POST /api/accounts/{uuid}/flavio/webhooks

Create a webhook

Flavio sends each event of the account to url as it happens: a POST with the event in JSON, the envelope that Events describes. Leave events out to receive all of them, or list the types you want. Only what happens after the webhook exists is sent: what happened before is on the timeline.

url must be https and reachable on the internet. The answer brings secret, only this once: keep it to check that each delivery comes from Flavio. Each one carries the header X-Flavio-Signature: t=<timestamp>,v1=<signature>, where the signature is the HMAC-SHA256, in hexadecimal, of <timestamp>.<body> with secret. Compute it over the body exactly as it arrives and compare it with v1; reject a t more than five minutes old.

Answer with a 2xx within 10 seconds and do the work afterwards. Any other answer, or none, is retried with longer and longer waits for 24 hours; after that the event is not sent again. Flavio can send the same event twice, so deduplicate by its id, and events can arrive out of order, so sort them by created_at. To check your endpoint right away, use Test a webhook.

Authentication

  • Authorization header · Bearer JWT

    The JWT of one account (HMAC-SHA256, signed with the API Key), sent as Authorization: Bearer <JWT>. It gives access to that account only: every operation of Flavio Agent, Webhooks, Site data and Keywords, competitors and pages, and updating the account.

Parameters

  • uuid path · stringrequired

    UUID of the Account

Request body

json:api
data.type
"webhook"required

data.attributes

  • url stringrequired

    Where Flavio sends the events. https, reachable on the internet.

    Example: https://hooks.example-builder.com/flavio

  • events string[]

    The types of event to send, from the catalog of Events. Empty or left out, all of them.

Responses

201 Created
json:api
data.type
"webhook"
data.id
string

ID of the webhook

data.attributes

  • url string

    Where Flavio sends the events

    Example: https://hooks.example-builder.com/flavio

  • events string[]

    The types of event it receives. Empty, all of them.

  • secret string

    The key of the signatures. Only in the answer of Create a webhook.

    Example: 3f9c1a7e5b2d4f6081a3c5e7f9b1d3e5a7c9e1f3b5d7f9a1c3e5

  • created_at string

    When it was created (UTC)

    Example: 2026-11-04T11:02:05Z

  • last_delivery_at stringnullable

    When Flavio last tried to send it an event (UTC); null until the first time

    Example: 2026-11-06T04:12:10Z

  • last_status integernullable

    The HTTP status of that try; null when it got no answer, or before the first

    Example: 200

  • last_error stringnullable

    Why that try failed, such as timeout or HTTP 500; null when it worked

    Example: null

  • failing_since stringnullable

    Since when its deliveries fail (UTC); null while the last one worked

    Example: null

400 Bad Request
  • errors object[]
    Child attributes
    • title string

      Error message title

      Example: Invalid field

    • detail string

      Error message detail

      Example: Another page of the plan is already at that path

    • source object

      The field that triggered the error

      Child attributes
      • pointer string

        Example: /data/attributes/path

403 Forbidden
  • errors object[]
    Child attributes
    • status number

      Numerical status code of the error

      Example: 403

    • title string

      A descriptive message of the error

      Example: Forbidden

404 Not Found
  • errors object[]
    Child attributes
    • status number

      HTTP status

      Example: 404

    • title string

      Error message title

      Example: Not Found

    • detail string

      Error message detail

      Example: The requested account ID was not found

409 Conflict
  • errors object[]
    Child attributes
    • status number

      HTTP status

      Example: 409

    • title string

      Error message title

      Example: Conflict

    • detail string

      Error message detail

      Example: The account needs a domain before a data source can be connected

Request

curl -X POST https://app.acmeseo.com/api/accounts/{uuid}/flavio/webhooks \
  -H "Authorization: Bearer <JWT>" \
  -H "Accept: application/vnd.marketgoo.api+json" \
  -H "Content-Type: application/vnd.marketgoo.api+json" \
  -d '{
  "data": {
    "type": "webhook",
    "attributes": {
      "url": "https://hooks.example-builder.com/flavio",
      "events": [
        "plan.ready",
        "intervention.opened",
        "intervention.resolved"
      ]
    }
  }
}'

Response

{
  "data": {
    "type": "webhook",
    "id": "7",
    "attributes": {
      "url": "https://hooks.example-builder.com/flavio",
      "events": [
        "plan.ready",
        "intervention.opened",
        "intervention.resolved"
      ],
      "secret": "3f9c1a7e5b2d4f6081a3c5e7f9b1d3e5a7c9e1f3b5d7f9a1c3e5",
      "created_at": "2026-11-04T11:02:05Z",
      "last_delivery_at": null,
      "last_status": null,
      "last_error": null,
      "failing_since": null
    }
  }
}
PATCH /api/accounts/{uuid}/flavio/webhooks/{webhook_id}

Update a webhook

Changes url or events. secret stays the same: to change it, delete the webhook and create another one.

Authentication

  • Authorization header · Bearer JWT

    The JWT of one account (HMAC-SHA256, signed with the API Key), sent as Authorization: Bearer <JWT>. It gives access to that account only: every operation of Flavio Agent, Webhooks, Site data and Keywords, competitors and pages, and updating the account.

Parameters

  • uuid path · stringrequired

    UUID of the Account

  • webhook_id path · stringrequired

    ID of the webhook

Request body

json:api
data.type
"webhook"required

data.attributes

  • url string

    Where Flavio sends the events. https, reachable on the internet.

    Example: https://hooks.example-builder.com/flavio

  • events string[]

    The types of event to send, from the catalog of Events. Empty, all of them.

Responses

200 OK
json:api
data.type
"webhook"
data.id
string

ID of the webhook

data.attributes

  • url string

    Where Flavio sends the events

    Example: https://hooks.example-builder.com/flavio

  • events string[]

    The types of event it receives. Empty, all of them.

  • secret string

    The key of the signatures. Only in the answer of Create a webhook.

    Example: 3f9c1a7e5b2d4f6081a3c5e7f9b1d3e5a7c9e1f3b5d7f9a1c3e5

  • created_at string

    When it was created (UTC)

    Example: 2026-11-04T11:02:05Z

  • last_delivery_at stringnullable

    When Flavio last tried to send it an event (UTC); null until the first time

    Example: 2026-11-06T04:12:10Z

  • last_status integernullable

    The HTTP status of that try; null when it got no answer, or before the first

    Example: 200

  • last_error stringnullable

    Why that try failed, such as timeout or HTTP 500; null when it worked

    Example: null

  • failing_since stringnullable

    Since when its deliveries fail (UTC); null while the last one worked

    Example: null

400 Bad Request
  • errors object[]
    Child attributes
    • title string

      Error message title

      Example: Invalid field

    • detail string

      Error message detail

      Example: Another page of the plan is already at that path

    • source object

      The field that triggered the error

      Child attributes
      • pointer string

        Example: /data/attributes/path

403 Forbidden
  • errors object[]
    Child attributes
    • status number

      Numerical status code of the error

      Example: 403

    • title string

      A descriptive message of the error

      Example: Forbidden

404 Not Found
  • errors object[]
    Child attributes
    • status number

      HTTP status

      Example: 404

    • title string

      Error message title

      Example: Not Found

    • detail string

      Error message detail

      Example: The requested account ID was not found

Request

curl -X PATCH https://app.acmeseo.com/api/accounts/{uuid}/flavio/webhooks/7 \
  -H "Authorization: Bearer <JWT>" \
  -H "Accept: application/vnd.marketgoo.api+json" \
  -H "Content-Type: application/vnd.marketgoo.api+json" \
  -d '{
  "data": {
    "type": "webhook",
    "attributes": {
      "events": []
    }
  }
}'

Response

{
  "data": {
    "type": "webhook",
    "id": "7",
    "attributes": {
      "url": "https://hooks.example-builder.com/flavio",
      "events": [
        "plan.ready",
        "intervention.opened",
        "intervention.resolved"
      ],
      "created_at": "2026-11-04T11:02:05Z",
      "last_delivery_at": "2026-11-06T04:12:10Z",
      "last_status": 200,
      "last_error": null,
      "failing_since": null
    }
  }
}
DELETE /api/accounts/{uuid}/flavio/webhooks/{webhook_id}

Delete a webhook

Flavio stops sending events to the webhook, the ones still being retried too.

Authentication

  • Authorization header · Bearer JWT

    The JWT of one account (HMAC-SHA256, signed with the API Key), sent as Authorization: Bearer <JWT>. It gives access to that account only: every operation of Flavio Agent, Webhooks, Site data and Keywords, competitors and pages, and updating the account.

Parameters

  • uuid path · stringrequired

    UUID of the Account

  • webhook_id path · stringrequired

    ID of the webhook

Responses

204 No Content

No response body.

403 Forbidden
  • errors object[]
    Child attributes
    • status number

      Numerical status code of the error

      Example: 403

    • title string

      A descriptive message of the error

      Example: Forbidden

404 Not Found
  • errors object[]
    Child attributes
    • status number

      HTTP status

      Example: 404

    • title string

      Error message title

      Example: Not Found

    • detail string

      Error message detail

      Example: The requested account ID was not found

Request

curl -X DELETE https://app.acmeseo.com/api/accounts/{uuid}/flavio/webhooks/7 \
  -H "Authorization: Bearer <JWT>"

Response

{
  "errors": [
    {
      "status": 403,
      "title": "Forbidden"
    }
  ]
}
POST /api/accounts/{uuid}/flavio/webhooks/{webhook_id}/test

Test a webhook

Sends the webhook a webhook.test event within a minute, signed like any other. It is not on the timeline. How it went shows in last_status and last_error of the webhook.

Authentication

  • Authorization header · Bearer JWT

    The JWT of one account (HMAC-SHA256, signed with the API Key), sent as Authorization: Bearer <JWT>. It gives access to that account only: every operation of Flavio Agent, Webhooks, Site data and Keywords, competitors and pages, and updating the account.

Parameters

  • uuid path · stringrequired

    UUID of the Account

  • webhook_id path · stringrequired

    ID of the webhook

Responses

202 Accepted

No response body.

403 Forbidden
  • errors object[]
    Child attributes
    • status number

      Numerical status code of the error

      Example: 403

    • title string

      A descriptive message of the error

      Example: Forbidden

404 Not Found
  • errors object[]
    Child attributes
    • status number

      HTTP status

      Example: 404

    • title string

      Error message title

      Example: Not Found

    • detail string

      Error message detail

      Example: The requested account ID was not found

Request

curl -X POST https://app.acmeseo.com/api/accounts/{uuid}/flavio/webhooks/7/test \
  -H "Authorization: Bearer <JWT>"

Response

{
  "errors": [
    {
      "status": 403,
      "title": "Forbidden"
    }
  ]
}