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=<string>' \
  --form data.attributes.media_type=avatar \
  --form data.attributes.is_primary=true \
  --form 'data.relationships.people.data[].type=<string>' \
  --form 'data.relationships.people.data[].id=3c90c3cc-0d44-4b50-8888-8dd25736052a' \
  --form 'data.relationships.companies.data[].type=<string>' \
  --form 'data.relationships.companies.data[].id=3c90c3cc-0d44-4b50-8888-8dd25736052a' \
  --form 'data.relationships.workspaces.data[].type=<string>' \
  --form 'data.relationships.workspaces.data[].id=3c90c3cc-0d44-4b50-8888-8dd25736052a' \
  --form 'data.relationships.workspaces.data[].external_workspace_id=3c90c3cc-0d44-4b50-8888-8dd25736052a'
{
  "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"
          }
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt

Use this file to discover all available pages before exploring further.

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