Create Snap Widget
Create a snap widget object.
Create a snap widget object.
Authorization
auth-token All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN> as a header to every API request.
How do I find my token?
In: header
Request Body
application/json
"email_preview" | "starter_message_nudge"The list of interactions supported by the widget.
A human readable name for the snap widget.
textLogical grouping of snap widgets. Useful for filtering.
"ai_assistant_message" | "comment_suggestion_replies" | "email_preview" | "link_preview" | "meeting_preview" | "plug_nudge"Sets the members that the snap widget is shared with.
items <= 8The status of the snap widget.
"draft" | "published"The list of bcc addresses.
The list of cc addresses.
The list of from addresses.
The html body of the email.
textThe in reply to of the email.
textThe list of inline attachments.
Whether the email is spam.
The message id of the email.
textThe raw email artifact.
idThe list of references in the email.
The list of reply to addresses.
The time the email was sent.
date-timeThe subject of the email.
textThe text body of the email.
textThe list of to addresses.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.devrev.ai/snap-widgets.create" \ -H "Content-Type: application/json" \ -d '{ "type": "email_preview", "name": "string" }'{
"snap_widget": {
"type": "email_preview",
"created_by": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
},
"created_date": "2023-01-01T12:00:00.000Z",
"display_id": "string",
"id": "string",
"modified_by": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
},
"modified_date": "2023-01-01T12:00:00.000Z",
"interactions": [
{
"type": "click",
"click_action": "open_plug_widget"
}
],
"name": "string",
"namespace": "ai_assistant_message",
"status": "draft",
"bcc": [
{
"address": "string",
"name": "string",
"user": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
}
}
],
"cc": [
{
"address": "string",
"name": "string",
"user": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
}
}
],
"from": [
{
"address": "string",
"name": "string",
"user": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
}
}
],
"html_body": "string",
"in_reply_to": "string",
"inlines": [
{
"artifact": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"content_id": "string"
}
],
"is_spam": true,
"message_id": "string",
"raw_email_artifact": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"references": [
"string"
],
"reply_to": [
{
"address": "string",
"name": "string",
"user": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
}
}
],
"sent_timestamp": "2023-01-01T12:00:00.000Z",
"subject": "string",
"text_body": "string",
"to": [
{
"address": "string",
"name": "string",
"user": {
"type": "dev_user",
"display_id": "string",
"id": "string",
"display_name": "string",
"display_picture": {
"display_id": "string",
"id": "string",
"file": {
"type": "string",
"name": "string",
"size": 0
}
},
"email": "string",
"full_name": "string",
"state": "active"
}
}
]
}
}{
"detail": "string",
"message": "string",
"type": "artifact_already_attached_to_a_parent",
"existing_parent": "string",
"is_same": true
}{
"detail": "string",
"message": "string",
"type": "unauthenticated"
}{
"detail": "string",
"message": "string",
"type": "forbidden"
}{
"detail": "string",
"message": "string",
"type": "too_many_requests",
"retry_after": 0
}{
"detail": "string",
"message": "string",
"type": "internal_error",
"reference_id": "string"
}{
"detail": "string",
"message": "string",
"type": "service_unavailable"
}