DataPI.

What would you like to understand?

Preparing search…
    All results and search filters →

    Machine API · Webhooks

    POST /v1/webhook-subscriptions

    Registers an HTTPS completion destination for the workspace. The response includes signing_secret exactly once. The destination must be public HTTPS on port 443 and must not use credentials, fragments or redirects.

    ImplementedMachine APIcreate_subscription_v1_webhook_subscriptions_post
    Surface: Machine API

    Contract identity

    Contract version
    1.0.0
    Last verified
    Public surface
    Machine API
    Executable operations
    11 / 40

    Verified means the contract snapshot on this date was read and matched to the page. It is not a promise that an operation is live for your workspace.

    Goal and how to use this API

    Register a public HTTPS receiver and securely capture its one-time signing secret. Receive signed completion events at an HTTPS endpoint so your integration can respond when background work finishes.

    Practical example

    Register the receiver, store the one-time signing secret securely, verify signatures and timestamps, acknowledge promptly, and inspect delivery history when troubleshooting.

    Integration steps

    1. Define the user decision and target entity, then check input requirements and access.
    2. Prepare the parameters and model below, then call POST /v1/webhook-subscriptions with this page’s authentication method.
    3. Inspect the HTTP status and its response model; preserve missing values and distinguish an error from an empty successful result.

    Secrets are returned once. Receivers must tolerate duplicate deliveries; a delivery record is transport evidence rather than proof of downstream business processing.

    At a glance

    Audience
    Machine API
    Pagination
    No
    Asynchronous
    No
    Idempotency
    No

    Authentication

    Workspace bearer token: Authorization: Bearer $DATAPI_API_TOKEN. The token must have the permission required by this route.

    Open the matching dashboard feature

    Parameters and constraints

    This endpoint has no declared parameters.

    Request body

    application/json

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequired—Field description is not supplied by the contract.
    event_typesarray<string>Optionalmin items: 1 · max items: 4Field description is not supplied by the contract.
    event_types[]stringRequired—Field description is not supplied by the contract.
    namestringRequiredmin length: 1 · max length: 100Field description is not supplied by the contract.
    operationsarray<string>Optionalmax items: 100Field description is not supplied by the contract.
    operations[]stringRequired—Field description is not supplied by the contract.
    urlstringRequiredmin length: 1 · max length: 2048Field description is not supplied by the contract.
    Full contract schema
    application/json
    {
      "$ref": "#/components/schemas/CreateWebhookSubscription"
    }

    Required means required within the containing object; an optional parent can still be omitted.

    Request example

    Examples are illustrative contract samples, not live results. Replace sample identifiers and inspect availability before executing a request.

    curl --fail-with-body -X POST "https://api.datapi.ir/v1/webhook-subscriptions" \
      -H "Authorization: Bearer $DATAPI_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '  {
        "event_types": [
          "example"
        ],
        "name": "example",
        "operations": [
          "social.instagram.profile.read"
        ],
        "url": "https://example.com/resource"
      }'

    Try it

    This sends a live request to https://api.datapi.ir with your credentials. Responses are shown as-is and may contain your workspace data.

    Kept in this form only; it is never stored or logged by this site.

    Responses and errors

    StatusDescriptionSchema
    201Successful Responseobject (fields not enumerated)
    400Invalid request fields or operation inputunspecified
    401Authentication required or expiredunspecified
    429Request allowance limit reachedunspecified
    503Operation or service unavailableunspecified
    {
      "data": {
        "subscription_id": "e03e46d3-e66b-490c-aee1-e8900c3e3699",
        "name": "Profile completions",
        "url": "https://your-app.example/webhooks/datapi",
        "operations": [
          "social.instagram.profile.read"
        ],
        "event_types": [
          "request.completed"
        ],
        "status": "active",
        "created_at": "2026-10-27T09:00:00Z",
        "signing_secret": "whsec_example_one_time_value"
      },
      "meta": {
        "request_id": "req_example"
      }
    }

    Complete response models

    201 · application/json

    The runtime contract does not enumerate this response. An example is not a guaranteed model; this response remains a contract documentation gap.

    Full contract schema
    201 schema
    {
      "additionalProperties": true,
      "title": "Response Create Subscription V1 Webhook Subscriptions Post",
      "type": "object"
    }

    400 · application/problem+json

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequired—Field description is not supplied by the contract.
    codestringRequired—Field description is not supplied by the contract.
    detailstringRequired—Field description is not supplied by the contract.
    errorobjectRequired—Field description is not supplied by the contract.
    error.errorobjectRequired—Field description is not supplied by the contract.
    error.error.codestringRequired—Field description is not supplied by the contract.
    error.error.detailsunspecifiedOptional—Field description is not supplied by the contract.
    error.error.messagestringRequired—Field description is not supplied by the contract.
    error.error.request_idstringRequired—Field description is not supplied by the contract.
    instancestringOptional—Field description is not supplied by the contract.
    request_idstringRequired—Field description is not supplied by the contract.
    statusintegerRequired—Field description is not supplied by the contract.
    titlestringRequired—Field description is not supplied by the contract.
    typestring (uri)Requiredformat: uriField description is not supplied by the contract.
    Full contract schema
    400 schema
    {
      "$ref": "#/components/schemas/DataPIProblem"
    }

    401 · application/problem+json

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequired—Field description is not supplied by the contract.
    codestringRequired—Field description is not supplied by the contract.
    detailstringRequired—Field description is not supplied by the contract.
    errorobjectRequired—Field description is not supplied by the contract.
    error.errorobjectRequired—Field description is not supplied by the contract.
    error.error.codestringRequired—Field description is not supplied by the contract.
    error.error.detailsunspecifiedOptional—Field description is not supplied by the contract.
    error.error.messagestringRequired—Field description is not supplied by the contract.
    error.error.request_idstringRequired—Field description is not supplied by the contract.
    instancestringOptional—Field description is not supplied by the contract.
    request_idstringRequired—Field description is not supplied by the contract.
    statusintegerRequired—Field description is not supplied by the contract.
    titlestringRequired—Field description is not supplied by the contract.
    typestring (uri)Requiredformat: uriField description is not supplied by the contract.
    Full contract schema
    401 schema
    {
      "$ref": "#/components/schemas/DataPIProblem"
    }

    429 · application/problem+json

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequired—Field description is not supplied by the contract.
    codestringRequired—Field description is not supplied by the contract.
    detailstringRequired—Field description is not supplied by the contract.
    errorobjectRequired—Field description is not supplied by the contract.
    error.errorobjectRequired—Field description is not supplied by the contract.
    error.error.codestringRequired—Field description is not supplied by the contract.
    error.error.detailsunspecifiedOptional—Field description is not supplied by the contract.
    error.error.messagestringRequired—Field description is not supplied by the contract.
    error.error.request_idstringRequired—Field description is not supplied by the contract.
    instancestringOptional—Field description is not supplied by the contract.
    request_idstringRequired—Field description is not supplied by the contract.
    statusintegerRequired—Field description is not supplied by the contract.
    titlestringRequired—Field description is not supplied by the contract.
    typestring (uri)Requiredformat: uriField description is not supplied by the contract.
    Full contract schema
    429 schema
    {
      "$ref": "#/components/schemas/DataPIProblem"
    }

    503 · application/problem+json

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequired—Field description is not supplied by the contract.
    codestringRequired—Field description is not supplied by the contract.
    detailstringRequired—Field description is not supplied by the contract.
    errorobjectRequired—Field description is not supplied by the contract.
    error.errorobjectRequired—Field description is not supplied by the contract.
    error.error.codestringRequired—Field description is not supplied by the contract.
    error.error.detailsunspecifiedOptional—Field description is not supplied by the contract.
    error.error.messagestringRequired—Field description is not supplied by the contract.
    error.error.request_idstringRequired—Field description is not supplied by the contract.
    instancestringOptional—Field description is not supplied by the contract.
    request_idstringRequired—Field description is not supplied by the contract.
    statusintegerRequired—Field description is not supplied by the contract.
    titlestringRequired—Field description is not supplied by the contract.
    typestring (uri)Requiredformat: uriField description is not supplied by the contract.
    Full contract schema
    503 schema
    {
      "$ref": "#/components/schemas/DataPIProblem"
    }

    Operational notes

    • The base URL is https://api.datapi.ir. Prefer the exact path shown; do not add a trailing slash.
    • Contract version 1. Responses use the stable DataPI error envelope; unknown optional fields should be ignored by clients.

    Related pages

    Runtime contract snapshot: DataPI API v1.0.0 · 75 HTTP operations documented of 265 runtime operations · 40 catalog operations · 11 available at capture. Captured: . Source: https://api.datapi.ir/v1/contracts.