chat.bsky.convo.sendMessage
POST/xrpc/chat.bsky.convo.sendMessage
This endpoint is part of the Bluesky Chat (DMs) APIs. Requests usually require authentication, are directed to the user's PDS intance, and proxied to the single central chat service by setting the appropriate service DID (did:web:api.bsky.chat
) in the service proxying header.
To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.
Request
- application/json
Body
required
Array [
Array [
- app.bsky.richtext.facet.mention
- app.bsky.richtext.facet.link
- app.bsky.richtext.facet.tag
]
]
- app.bsky.embed.record
message
object
required
Possible values: <= 10000 characters
facets
object[]
index
object
required
Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.
features
object[]
required
oneOf
Possible values: <= 640 characters
embed
object
oneOf
record
object
required
Responses
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- app.bsky.richtext.facet.mention
- app.bsky.richtext.facet.link
- app.bsky.richtext.facet.tag
]
]
- app.bsky.embed.record.view
- app.bsky.embed.record.viewRecord
- app.bsky.embed.record.viewNotFound
- app.bsky.embed.record.viewBlocked
- app.bsky.embed.record.viewDetached
- app.bsky.feed.defs.generatorView
- app.bsky.graph.defs.listView
- app.bsky.labeler.defs.labelerView
- app.bsky.graph.defs.starterPackViewBasic
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
Array [
]
Array [
]
Array [
- app.bsky.embed.images.view
- app.bsky.embed.video.view
- app.bsky.embed.external.view
- app.bsky.embed.recordWithMedia.view
Array [
]
- app.bsky.embed.images.view
- app.bsky.embed.video.view
- app.bsky.embed.external.view
Array [
]
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
Array [
Array [
]
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
Array [
Array [
]
]
Array [
]
Array [
Array [
- app.bsky.richtext.facet.mention
- app.bsky.richtext.facet.link
- app.bsky.richtext.facet.tag
]
]
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
Array [
Array [
]
]
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
Array [
- app.bsky.richtext.facet.mention
- app.bsky.richtext.facet.link
- app.bsky.richtext.facet.tag
]
]
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
Array [
Array [
]
]
Array [
]
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
- app.bsky.graph.defs.modlist
- app.bsky.graph.defs.curatelist
- app.bsky.graph.defs.referencelist
Array [
]
Array [
]
Array [
]
Possible values: <= 10000 characters
facets
object[]
index
object
required
Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.
features
object[]
required
oneOf
Possible values: <= 640 characters
embed
object
oneOf
record
object
required
oneOf
author
object
required
Possible values: <= 640 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
viewer
object
Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
mutedByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
blockingByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
knownFollowers
object
The subject's followers whom you also follow
Possible values: <= 5
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
embeds
object[]
oneOf
images
object[]
required
Possible values: < 4
Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.
Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.
Alt text description of the image, for accessibility.
aspectRatio
object
width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.
Possible values: >= 1
Possible values: >= 1
Possible values: <= 10000 characters
aspectRatio
object
width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.
Possible values: >= 1
Possible values: >= 1
external
object
required
media
object
required
oneOf
images
object[]
required
Possible values: < 4
Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.
Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.
Alt text description of the image, for accessibility.
aspectRatio
object
width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.
Possible values: >= 1
Possible values: >= 1
Possible values: <= 10000 characters
aspectRatio
object
width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.
Possible values: >= 1
Possible values: >= 1
external
object
required
Default value: true
Default value: true
author
object
required
viewer
object
Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
mutedByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
blockingByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
knownFollowers
object
The subject's followers whom you also follow
followers
object[]
required
Possible values: < 5
Possible values: <= 640 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
Default value: true
creator
object
required
Possible values: <= 640 characters
Possible values: <= 2560 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
viewer
object
Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
mutedByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
blockingByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
knownFollowers
object
The subject's followers whom you also follow
followers
object[]
required
Possible values: < 5
Possible values: <= 640 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
Possible values: <= 3000 characters
descriptionFacets
object[]
index
object
required
Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.
features
object[]
required
oneOf
Possible values: <= 640 characters
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
creator
object
required
Possible values: <= 640 characters
Possible values: <= 2560 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
viewer
object
Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
mutedByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
blockingByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
knownFollowers
object
The subject's followers whom you also follow
followers
object[]
required
Possible values: < 5
Possible values: <= 640 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
Possible values: <= 3000 characters
descriptionFacets
object[]
index
object
required
Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.
features
object[]
required
oneOf
Possible values: <= 640 characters
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
creator
object
required
Possible values: <= 640 characters
Possible values: <= 2560 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
viewer
object
Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
mutedByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
blockingByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
knownFollowers
object
The subject's followers whom you also follow
followers
object[]
required
Possible values: < 5
Possible values: <= 640 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
creator
object
required
Possible values: <= 640 characters
associated
object
chat
object
Possible values: [all
, none
, following
]
viewer
object
Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
mutedByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
blockingByList
object
Possible values: non-empty
and <= 64 characters
purpose
object
required
oneOf
string
string
string
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
viewer
object
knownFollowers
object
The subject's followers whom you also follow
Possible values: <= 5
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
labels
object[]
DID of the actor who created this label.
AT URI of the record, repository (account), or other resource that this label applies to.
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
Possible values: <= 128 characters
The short string name of the value or type of this label.
If true, this is a negation label, overwriting a previous label.
Timestamp when this label was created.
Timestamp at which this label expires (no longer applies).
Signature of dag-cbor encoded label.
sender
object
required
{
"id": "string",
"rev": "string",
"text": "string",
"facets": [
{
"index": {
"byteStart": 0,
"byteEnd": 0
},
"features": [
{},
{},
{}
]
}
],
"embed": {},
"sender": {
"did": "string"
},
"sentAt": "2024-10-08T00:27:32.729Z"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [InvalidRequest
, ExpiredToken
, InvalidToken
]
{
"error": "InvalidRequest",
"message": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}