Chats
Send a voice memo to a chat
Send an uploaded audio Attachment as a voice memo.
POST
/
v1
/
chats
/
{chatId}
/
voicememo
Send a voice memo to a chat
curl --request POST \
--url https://api.relayapp.im/v1/chats/{chatId}/voicememo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice_memo_url": "<string>",
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"voice_memo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": [
"<string>"
],
"status": "<string>",
"voice_memo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"duration_ms": 1,
"width": 2,
"height": 2
},
"created_at": "2023-11-07T05:31:56Z",
"chat": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"subtitle": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"owner": {
"kind": "organization",
"name": "<string>",
"verified": true
},
"rive": {
"file": "https://cdn.relayapp.im/rive/0199a000-0000-7000-8000-00000000000b/1790000000000/file-0123456789abcdef.riv",
"artboard": "Call",
"state_machine": "Main",
"view_model": "Main"
},
"timezone": "America/Detroit",
"age_range": "18_plus",
"links": [
"https://github.com/ana",
"https://www.instagram.com/ana"
],
"about": "Builds robots in Ann Arbor.",
"activity_version": "<string>",
"activity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"emoji": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}
}
],
"is_group": true
}
}
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 429,
"code": 2008,
"message": "Too many messages. Try again shortly.",
"doc_url": "https://docs.relayapp.im/error/codes/2xxx/2008",
"retry_after": 10
},
"success": false
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}Authorizations
Headers
Body
application/json
- Option 1
- Option 2
Request to send a voice memo to a chat (chat_id provided in path).
Exactly one of voice_memo_url or attachment_id must be provided.
⌘I
Send a voice memo to a chat
curl --request POST \
--url https://api.relayapp.im/v1/chats/{chatId}/voicememo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice_memo_url": "<string>",
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"voice_memo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": [
"<string>"
],
"status": "<string>",
"voice_memo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"duration_ms": 1,
"width": 2,
"height": 2
},
"created_at": "2023-11-07T05:31:56Z",
"chat": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"subtitle": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"owner": {
"kind": "organization",
"name": "<string>",
"verified": true
},
"rive": {
"file": "https://cdn.relayapp.im/rive/0199a000-0000-7000-8000-00000000000b/1790000000000/file-0123456789abcdef.riv",
"artboard": "Call",
"state_machine": "Main",
"view_model": "Main"
},
"timezone": "America/Detroit",
"age_range": "18_plus",
"links": [
"https://github.com/ana",
"https://www.instagram.com/ana"
],
"about": "Builds robots in Ann Arbor.",
"activity_version": "<string>",
"activity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"emoji": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}
}
],
"is_group": true
}
}
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 429,
"code": 2008,
"message": "Too many messages. Try again shortly.",
"doc_url": "https://docs.relayapp.im/error/codes/2xxx/2008",
"retry_after": 10
},
"success": false
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}
