> For the complete documentation index, see [llms.txt](https://contacted.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://contacted.gitbook.io/docs/api-reference/email-status.md).

# Email Status

## Get Message Status

> Retrieve the current status of a sent message using its ID.\
> \
> \## SDK Examples\
> \
> \### Node.js\
> \`\`\`javascript\
> const status = await contacted.getMessageStatus('550e8400-e29b-41d4-a716-446655440000');\
> console.log('Message status:', status.status);\
> \`\`\`\
> \
> \### Python\
> \`\`\`python\
> status = contacted.get\_message\_status('550e8400-e29b-41d4-a716-446655440000')\
> print(f"Message status: {status\['status']}")\
> \`\`\`<br>

````json
{"openapi":"3.0.3","info":{"title":"ContactedAI API","version":"0.0.11"},"tags":[{"name":"Messages","description":"Send AI-generated messages and check their status"}],"servers":[{"url":"https://api.contacted.io","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"API_KEY","description":"Your ContactedAI API key. Get yours at [contacted.io](https://contacted.io)\n\nUse the Authorization header with Bearer scheme:\n`Authorization: Bearer CONTACTED_API_KEY_1234567890abcdef...`\n"}},"schemas":{"MessageStatusResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier"},"status":{"type":"string","enum":["queued","sent","failed"],"description":"Current message status"},"message":{"type":"string","description":"Human-readable status message"},"created_at":{"type":"string","format":"date-time","description":"Message creation timestamp"},"updated_at":{"type":"string","format":"date-time","description":"Last status update timestamp"},"sent_at":{"type":"string","format":"date-time","description":"Message delivery timestamp (only present when status is 'sent')"},"error_reason":{"type":"string","description":"Error description (only present when status is 'failed')"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error type identifier"},"message":{"type":"string","description":"Human-readable error message"},"code":{"type":"integer","description":"HTTP status code"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (for rate limits)"}}}}},"paths":{"/message":{"get":{"summary":"Get Message Status","description":"Retrieve the current status of a sent message using its ID.\n\n## SDK Examples\n\n### Node.js\n```javascript\nconst status = await contacted.getMessageStatus('550e8400-e29b-41d4-a716-446655440000');\nconsole.log('Message status:', status.status);\n```\n\n### Python\n```python\nstatus = contacted.get_message_status('550e8400-e29b-41d4-a716-446655440000')\nprint(f\"Message status: {status['status']}\")\n```\n","operationId":"getMessageStatus","tags":["Messages"],"parameters":[{"name":"id","in":"query","required":true,"description":"The unique message ID returned from the send endpoint","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Message status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Message not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
````
