Create an intent

Last updated 04/08/2026

Create an intent when you want to give Zeus contact or intent attributes and select the agent channel that should evaluate the request. For an API chat, this endpoint is optional: sending the first message can initialize a thread with empty attributes instead.

Back to the API overview

Create an intent

POST https://api.openfi.tech/v1/intents
Content-Type: application/json
x-api-key: YOUR_API_KEY

A successful call may create an initial outgoing message, depending on the selected agent's flow and the current conversation state.

Request body

FieldTypeRequiredDescription
sourcestringYesA non-empty label for where the intent originated, such as website-chat or quote-form.
predefinedAgentChannelIdUUIDYesThe account-owned Zeus agent channel that should evaluate the intent.
contactobjectYesThe associated contact.
contact.attributesobjectYesContact attributes configured for the account. Use an empty object when none are needed.
contact.communicationChannelsarrayYesOne or more ways to identify or reach the contact. The array cannot be empty.
contact.communicationChannels[].typestringYesThe configured channel type: api, whatsapp, twilio-sms, widget, or test.
contact.communicationChannels[].idstringYesThe contact's non-empty identifier on that channel. For an API channel, use your stable end-user or chat-session ID.
attributesobjectYesIntent attributes configured for the account. Use an empty object when none are needed.

Account-specific attributes

The accepted keys in contact.attributes and the top-level attributes object come from your Zeus account configuration. Each configured field is optional, but both objects must be present.

Values must match the configured type: string, number, boolean, or one of the configured enum options. String attributes contain between 1 and 255 characters. Account-specific validation rules may also apply. Unknown keys or invalid values return 400 Bad Request.

Configure an attribute in Zeus before including it in a request.

Choose an agent channel

predefinedAgentChannelId is the ID of a configured agent channel, not an agent ID or phone number. It must belong to the account associated with the API key, and its channel type must match at least one item in contact.communicationChannels.

For a server-to-server chat, select an api agent channel and include an api contact communication channel. Put your stable external identifier in its id request field, then use that same value as the contactChannelExternalId on the message endpoints. This request field is not a Zeus internal channel ID.

Contact the Zeus team if you do not know the configured agent channel ID.

Example request

Load the API key into ZEUS_API_KEY from your secret manager or a secure shell prompt.

A successful request may cause Zeus to contact the recipient. Test with a configured test user, source, matching channel, and only attributes configured for your account.

curl --request POST 'https://api.openfi.tech/v1/intents' \
  --header 'Content-Type: application/json' \
  --header "x-api-key: ${ZEUS_API_KEY}" \
  --data '{
    "source": "website-chat",
    "predefinedAgentChannelId": "YOUR_API_AGENT_CHANNEL_ID",
    "contact": {
      "attributes": {},
      "communicationChannels": [
        {
          "type": "api",
          "id": "customer-user-123"
        }
      ]
    },
    "attributes": {}
  }'

Response

A successful request returns 201 Created:

{
  "intentId": "56ce9e6d-6b39-4702-8444-9574fa74a167"
}

The ID identifies the intent accepted for this request. It may be a newly created intent or an applicable existing intent. This response does not confirm that an outgoing message was created or delivered. Use webhooks to receive conversation updates.

Errors and retries

StatusMeaning
400 Bad RequestThe body is invalid, contains an unknown attribute, references an unavailable agent channel, or has no contact channel matching the selected agent channel type.
401 UnauthorizedThe x-api-key header is missing or invalid.
409 ConflictThe applicable conversation is currently managed by a human.
429 Too Many RequestsThe account exceeded 5,000 intent requests in one hour. Follow Retry-After before retrying.
500 Internal Server ErrorThe request outcome may be unknown. Do not assume that no intent or message was created.

This endpoint does not accept an idempotency key. Avoid automatically repeating a request after an ambiguous timeout or 500 response unless your integration can tolerate the current intent-selection behavior.