Generate a link for an existing conversation or for a contact on a new conversation screen.
Settings:
URL | Method |
|---|---|
| JSON via POST |
Authorization:
Header Parameter | Description |
|---|---|
| User API key; access depends on the user's permissions. |
|
|
Path Parameters:
Parameter | Description | Required |
|---|---|---|
| Account identifier. | Yes |
| Form identifier in the path. | Yes |
Request Body:
For an existing conversation, conversation_id is the conversation display ID:
{"conversation_id": 42}For a contact who may not exist yet:
{"inbox_id": 7, "contact": {"email": "a@b.com", "name": "Dana"}}Parameter | Description |
|---|---|
| Conversation display ID. |
| Inbox identifier. |
| Contact email address. |
| Contact name. |
Request Examples:
curl -s -X POST -H "api_access_token: $TOKEN" -H "Content-Type: application/json" \
"$BASE_URL/api/v1/accounts/$ACCOUNT_ID/forms/$FORM/links" \
-d '{"conversation_id": 1}'
curl -s -X POST -H "api_access_token: $TOKEN" -H "Content-Type: application/json" \
"$BASE_URL/api/v1/accounts/$ACCOUNT_ID/forms/$FORM/links" \
-d '{"inbox_id": 7, "contact": {"email": "a@b.com", "name": "Dana"}}'Response:
{"form_link": "https://forms.example.com/forms/1/answer?t=<opaque-token>"}Response-Explain:
Parameter | Description |
|---|---|
| Generated URL for opening the form. |