Skip to main content
POST
/
v1
/
medias
Create media
curl --request POST \
  --url https://api.wellapp.ai/v1/medias \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'data={"type":"media","attributes":{"media_type":"avatar","is_primary":true},"relationships":{"people":{"data":[{"type":"people","id":"550e8400-e29b-41d4-a716-446655440000"}]}}}'
{
  "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"
          }
        }
      ]
    }
  ]
}

Headers

Authorization
string
required

Bearer token for authentication

Body

file
file
required

Image in png, jpg or svg format

data.type
string
required

Resource type identifier

Allowed value: "media"
data.attributes.media_type
enum<string>

Type of media (avatar, logo, banner)

Available options:
avatar,
logo,
banner
data.attributes.is_primary
boolean
default:true

Marks preferred media. Default: true

data.relationships.people.data[].type
string

Type for people relationship

Allowed value: "people"
data.relationships.people.data[].id
string<uuid>

UUID of the person to associate with this media

data.relationships.companies.data[].type
string

Type for company relationship

Allowed value: "company"
data.relationships.companies.data[].id
string<uuid>

UUID of the company to associate with this media

data.relationships.workspaces.data[].type
string

Type for workspace relationship

Allowed value: "workspace"
data.relationships.workspaces.data[].id
string<uuid>

UUID of the workspace to associate with this media

data.relationships.workspaces.data[].external_workspace_id
string<uuid>

UUID of the external workspace to associate with this media

Response

Media created successfully

data
object