X DMs API
Tracked X DM conversations and drafted messages.
5 endpoints. Every path is relative to the API base URL and needs a bearer token unless it is marked public. See the REST API overview for authentication, errors and pagination.
GET/v1/orgs/{orgId}/dms
Lists the X direct-message conversations the user is tracking, with the drafted next message. Conversations where it's the user's turn come first, then ones where a follow-up is due.
Path parameters
orgIdstring (uuid)required
Query parameters
statusstringone of
open,your_turn,waiting,follow_up_due,closed,all
Responses
200Lists the X direct-message conversations the user is tracking, with the drafted next message. Conversations where it's the user's turn come first, then ones where a follow-up is due.
dataobjectrequiredFields
itemsarray<object>requiredItem fields
idstring (uuid)requiredplatformstringrequiredone of
xstatusstringrequiredone of
your_turn,waiting,closedpersonobjectrequiredFields
handlestringrequirednamestring | nullrequiredbiostring | nullrequiredfollowersinteger | nullrequiredprofileUrlstringrequired
notesstring | nullrequiredmessagesarray<object>requiredItem fields
idstring (uuid)requiredfromstringrequiredone of
them,metextstringrequiredatstringrequired
draftTextstring | nullrequireddraftReasonstring | nullrequireddraftedAtstring | nullrequiredlastMessageAtstring | nullrequiredfollowUpAtstring | nullrequiredfollowUpDuebooleanrequiredsendOnXUrlstringrequiredcreatedAtstringrequired
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/dms" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"POST/v1/orgs/{orgId}/dms
Starts tracking a direct-message conversation with someone on X, optionally with the messages so far, and drafts the next message in the user's voice. Adding someone already tracked carries on their conversation. Sends nothing.
Path parameters
orgIdstring (uuid)required
Request body application/json
handleanyrequiredmessagesarray<object>Item fields
fromstringrequiredone of
them,metextstringrequired
notesstringdraftbooleanguidancestring
Responses
201Starts tracking a direct-message conversation with someone on X, optionally with the messages so far, and drafts the next message in the user's voice. Adding someone already tracked carries on their conversation. Sends nothing.
dataobjectrequiredFields
idstring (uuid)requiredplatformstringrequiredone of
xstatusstringrequiredone of
your_turn,waiting,closedpersonobjectrequiredFields
handlestringrequirednamestring | nullrequiredbiostring | nullrequiredfollowersinteger | nullrequiredprofileUrlstringrequired
notesstring | nullrequiredmessagesarray<object>requiredItem fields
idstring (uuid)requiredfromstringrequiredone of
them,metextstringrequiredatstringrequired
draftTextstring | nullrequireddraftReasonstring | nullrequireddraftedAtstring | nullrequiredlastMessageAtstring | nullrequiredfollowUpAtstring | nullrequiredfollowUpDuebooleanrequiredsendOnXUrlstringrequiredcreatedAtstringrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/dms" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"handle":"string"}'PATCH/v1/orgs/{orgId}/dms/{conversationId}
Logs a message the other person sent or one the user sent on X, edits the drafted message or notes, or closes or reopens the conversation. Optionally drafts the next message. Sends nothing.
Path parameters
orgIdstring (uuid)requiredconversationIdstring (uuid)required
Request body application/json
addMessageobjectFields
fromstringrequiredone of
them,metextstringrequired
notesstringdraftTextstringstatusstringone of
open,closeddraftbooleanguidancestring
Responses
200Logs a message the other person sent or one the user sent on X, edits the drafted message or notes, or closes or reopens the conversation. Optionally drafts the next message. Sends nothing.
dataobjectrequiredFields
idstring (uuid)requiredplatformstringrequiredone of
xstatusstringrequiredone of
your_turn,waiting,closedpersonobjectrequiredFields
handlestringrequirednamestring | nullrequiredbiostring | nullrequiredfollowersinteger | nullrequiredprofileUrlstringrequired
notesstring | nullrequiredmessagesarray<object>requiredItem fields
idstring (uuid)requiredfromstringrequiredone of
them,metextstringrequiredatstringrequired
draftTextstring | nullrequireddraftReasonstring | nullrequireddraftedAtstring | nullrequiredlastMessageAtstring | nullrequiredfollowUpAtstring | nullrequiredfollowUpDuebooleanrequiredsendOnXUrlstringrequiredcreatedAtstringrequired
curl -X PATCH "https://api.adventur.ai/v1/orgs/$ORG_ID/dms/$CONVERSATION_ID" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'DELETE/v1/orgs/{orgId}/dms/{conversationId}
Stops tracking a conversation and deletes what was logged. Nothing changes on X.
Path parameters
orgIdstring (uuid)requiredconversationIdstring (uuid)required
Responses
200Stops tracking a conversation and deletes what was logged. Nothing changes on X.
dataobjectrequiredFields
idstring (uuid)requiredplatformstringrequiredone of
xstatusstringrequiredone of
your_turn,waiting,closedpersonobjectrequiredFields
handlestringrequirednamestring | nullrequiredbiostring | nullrequiredfollowersinteger | nullrequiredprofileUrlstringrequired
notesstring | nullrequiredmessagesarray<object>requiredItem fields
idstring (uuid)requiredfromstringrequiredone of
them,metextstringrequiredatstringrequired
draftTextstring | nullrequireddraftReasonstring | nullrequireddraftedAtstring | nullrequiredlastMessageAtstring | nullrequiredfollowUpAtstring | nullrequiredfollowUpDuebooleanrequiredsendOnXUrlstringrequiredcreatedAtstringrequired
curl -X DELETE "https://api.adventur.ai/v1/orgs/$ORG_ID/dms/$CONVERSATION_ID" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"POST/v1/orgs/{orgId}/dms/{conversationId}/draft
Drafts the next message in a DM conversation in the user's voice: an opener, a reply to their last message, or a follow-up when they haven't answered. Sends nothing.
Path parameters
orgIdstring (uuid)requiredconversationIdstring (uuid)required
Request body application/json
guidancestring
Responses
200Drafts the next message in a DM conversation in the user's voice: an opener, a reply to their last message, or a follow-up when they haven't answered. Sends nothing.
dataobjectrequiredFields
idstring (uuid)requiredplatformstringrequiredone of
xstatusstringrequiredone of
your_turn,waiting,closedpersonobjectrequiredFields
handlestringrequirednamestring | nullrequiredbiostring | nullrequiredfollowersinteger | nullrequiredprofileUrlstringrequired
notesstring | nullrequiredmessagesarray<object>requiredItem fields
idstring (uuid)requiredfromstringrequiredone of
them,metextstringrequiredatstringrequired
draftTextstring | nullrequireddraftReasonstring | nullrequireddraftedAtstring | nullrequiredlastMessageAtstring | nullrequiredfollowUpAtstring | nullrequiredfollowUpDuebooleanrequiredsendOnXUrlstringrequiredcreatedAtstringrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/dms/$CONVERSATION_ID/draft" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'