Create Media
post
/v1/mediasCreate a new media record with relationships to people, companies, or workspaces
Requires a bearer token: Authorization: Bearer <token>.
Request
cURL
curl -X POST https://api.wellapp.ai/v1/medias \
-H "Authorization: Bearer $WELL_API_TOKEN" \
-H "Content-Type: application/json" \
-d '"Value"'Request body
"Value"Responses
201 — Media created successfully
{
"data": [
{
"type": "media",
"id": "media1",
"attributes": {
"media_type": "avatar",
"url": "https://cdn.example.com/avatar.jpg",
"is_primary": true,
"uploaded_at": "2025-06-01T10:00:00Z",
"processed_at": "2025-06-01T10:00:00Z"
},
"relationships": {
"people": {
"data": [
{
"type": "people",
"id": "b6c22e98-c8d0-485e-9d3d-caa2bbaff77c"
}
]
},
"companies": {
"data": [
{
"type": "company",
"id": "b6c22e98-c8d0-485e-9d3d-caa2bbaff77a"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "b6c22e98-c8d0-485e-9d3d-caa2bbaff77b"
}
]
}
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"job_title": "Software Engineer",
"created_at": "2025-05-01T09:00:00Z",
"updated_at": "2025-06-01T10:00:00Z"
}
},
{
"type": "company",
"id": "b6c22e98-c8d0-485e-9d3d-caa2bbaff77a",
"attributes": {
"name": "Tech Startup Inc",
"description": "An innovative technology company focused on AI and ML solutions",
"registration_tax_id": "12345678901",
"registration_registered_value": "123456789",
"created_at": "2025-08-03T10:38:40.967Z",
"updated_at": "2025-08-04T07:51:01.785Z"
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "Marketing Team Workspace",
"description": "Collaborative workspace for the marketing team to manage campaigns and content",
"external_workspace_id": "fygr_123",
"created_at": "2024-01-05T08:00:00Z",
"updated_at": "2024-01-18T12:15:00Z"
}
}
]
}
]
}400 — Bad request - validation error
{
"code": "BAD_REQUEST",
"status": 400,
"title": "Bad Request",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}401 — Unauthorized - invalid API key
{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}