By using this website, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Accept All
API Documentation

Users

The Users API allows you to manage user accounts and permissions within the Meridian CRM system.

Authentication

All requests must include a Bearer token in the HTTP header:

Authorization: Bearer ACCESS_TOKEN

Endpoints

List Users

Description: Retrieve a list of users from the user's organization.

Endpoint: GET api/public/v1/users/

Optional Query Parameters:

  • search (string): Filter by first name, last name, or email
  • ordering (string): Order results by specific fields (e.g., first_name, created for descending)
  • role (string): Filter by user role

Response Example:

[
  {
    "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "is_active": true,
    "role": "admin",
    "created": "2025-01-15T10:00:00Z",
    "modified": "2025-01-15T10:00:00Z",
    "organization": {
      "id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
      "name": "Example Organization"
    }
  }
]

Get User Details

Description: Retrieve details for a specific user.

Endpoint: GET api/public/v1/users/{id}/

Response Example:

{
  "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "is_active": true,
  "role": "admin",
  "created": "2025-01-15T10:00:00Z",
  "modified": "2025-01-15T10:00:00Z",
  "organization": {
    "id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
    "name": "Example Organization"
  },
  "permissions": [
    "create_company",
    "edit_company",
    "delete_company",
    "create_deal",
    "edit_deal",
    "delete_deal",
    "manage_users"
  ],
  "companies": [
    {
      "id": "bfcd725e-88da-41cd-8d9c-6aed5dda1a4a",
      "title": "Acme Corp"
    }
  ],
  "deals": [
    {
      "id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
      "title": "Enterprise Software License"
    }
  ],
  "meetings": [
    {
      "id": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
      "title": "Deal Discussion"
    }
  ],
  "last_login": "2025-04-30T09:15:00Z",
  "profile_picture_url": "<https://api.meridian-ai.com/media/profile_pictures/1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d.jpg>"
}

Get Current User

Description: Retrieve details for the currently authenticated user.

Endpoint: GET api/public/v1/users/me/

Response: Returns the user object for the currently authenticated user.

Create User

Description: Create a new user.

Endpoint: POST api/public/v1/users/

Request Example:

{
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane.smith@example.com",
  "role": "member"
}

Response: Returns the created user object with HTTP 201 status code.

Update User

Description: Update an existing user.

Endpoint: PUT api/public/v1/users/{id}/

Request Example:

{
  "first_name": "Jane",
  "last_name": "Smith-Johnson",
  "role": "admin"
}

Response: Returns the updated user object.

Deactivate User

Description: Deactivate a user (soft delete).

Endpoint: POST api/public/v1/users/{id}/deactivate/

Response: Returns HTTP 200 OK on success.

Reactivate User

Description: Reactivate a previously deactivated user.

Endpoint: POST api/public/v1/users/{id}/reactivate/

Response: Returns HTTP 200 OK on success.

Update User Permissions

Description: Update permissions for a user.

Endpoint: PUT api/public/v1/users/{id}/permissions/

Request Example:

{
  "permissions": [
    "create_company",
    "edit_company",
    "create_deal",
    "edit_deal"
  ]
}

Response: Returns the updated user permissions with HTTP 200 OK status code.

Upload Profile Picture

Description: Upload a profile picture for a user.

Endpoint: POST api/public/v1/users/{id}/profile-picture/

Request Example:

# Multipart form data
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="profile.jpg"
Content-Type: image/jpeg

(Binary file data)
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Response: Returns the updated user object with the new profile picture URL.

List Organizations

Description: Retrieve a list of organizations the user has access to.

Endpoint: GET api/public/v1/organizations/

Response Example:

[
  {
    "id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
    "name": "Example Organization",
    "created": "2025-01-01T00:00:00Z",
    "modified": "2025-01-01T00:00:00Z",
    "user_role": "admin",
    "user_count": 15,
    "subscription_status": "active",
    "subscription_plan": "enterprise"
  }
]

Get Organization Details

Description: Retrieve details for a specific organization.

Endpoint: GET api/public/v1/organizations/{id}/

Response Example:

{
  "id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
  "name": "Example Organization",
  "created": "2025-01-01T00:00:00Z",
  "modified": "2025-01-01T00:00:00Z",
  "subscription_status": "active",
  "subscription_plan": "enterprise",
  "subscription_expires": "2026-01-01T00:00:00Z",
  "users": [
    {
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "role": "admin"
    }
  ],
  "settings": {
    "timezone": "America/New_York",
    "date_format": "MM/DD/YYYY",
    "default_currency": "USD",
    "logo_url": "<https://api.meridian-ai.com/media/organization_logos/9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d.png>"
  }
}

Update Organization

Description: Update an existing organization.

Endpoint: PUT api/public/v1/organizations/{id}/

Request Example:

{
  "name": "Updated Organization Name",
  "settings": {
    "timezone": "Europe/London",
    "date_format": "DD/MM/YYYY",
    "default_currency": "EUR"
  }
}

Response: Returns the updated organization object.

Upload Organization Logo

Description: Upload a logo for an organization.

Endpoint: POST api/public/v1/organizations/{id}/logo/

Request Example:

# Multipart form data
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="logo.png"
Content-Type: image/png

(Binary file data)
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Response: Returns the updated organization object with the new logo URL.

Invite User to Organization

Description: Send an invitation to a user to join an organization.

Endpoint: POST api/public/v1/organizations/{id}/invite/

Request Example:

{
  "email": "new.user@example.com",
  "role": "member",
  "permissions": [
    "create_company",
    "edit_company",
    "create_deal",
    "edit_deal"
  ]
}

Response: Returns the created invitation object with HTTP 201 status code.

List User Invitations

Description: Retrieve a list of pending invitations for an organization.

Endpoint: GET api/public/v1/organizations/{id}/invitations/

Response Example:

[
  {
    "id": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b",
    "email": "new.user@example.com",
    "role": "member",
    "created": "2025-04-30T09:15:00Z",
    "expires": "2025-05-07T09:15:00Z",
    "status": "pending",
    "invited_by": {
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "first_name": "John",
      "last_name": "Doe"
    }
  }
]

Cancel Invitation

Description: Cancel a pending invitation.

Endpoint: DELETE api/public/v1/organizations/invitations/{id}/

Response: Returns HTTP 204 No Content on success.

Accept Invitation

Description: Accept an invitation to join an organization.

Endpoint: POST api/public/v1/organizations/invitations/{id}/accept/

Response: Returns HTTP 200 OK on success.

Metadata Endpoints

User Metadata

Description: Retrieve metadata about user fields, including field names, types, and whether they are required, createable, or updateable.

Endpoint: GET api/public/v1/users/metadata/fields/

Response Example:

{
  "fields": [
    {
      "name": "first_name",
      "label": "First Name",
      "type": "string",
      "required": true,
      "createable": true,
      "updateable": true
    },
    {
      "name": "last_name",
      "label": "Last Name",
      "type": "string",
      "required": true,
      "createable": true,
      "updateable": true
    },
    {
      "name": "email",
      "label": "Email",
      "type": "email",
      "required": true,
      "createable": true,
      "updateable": true
    },
    {
      "name": "role",
      "label": "Role",
      "type": "picklist",
      "required": true,
      "createable": true,
      "updateable": true,
      "options": [
        {"value": "admin", "label": "Administrator"},
        {"value": "member", "label": "Member"}
      ]
    },
    {
      "name": "is_active",
      "label": "Active",
      "type": "boolean",
      "required": false,
      "createable": false,
      "updateable": false
    }
  ]
}

Organization Metadata

Description: Retrieve metadata about organization fields.

Endpoint: GET api/public/v1/organizations/metadata/fields/

Response Example:

{
  "fields": [
    {
      "name": "name",
      "label": "Organization Name",
      "type": "string",
      "required": true,
      "createable": true,
      "updateable": true
    },
    {
      "name": "settings",
      "label": "Settings",
      "type": "object",
      "required": false,
      "createable": true,
      "updateable": true,
      "properties": [
        {
          "name": "timezone",
          "label": "Timezone",
          "type": "string",
          "required": false,
          "createable": true,
          "updateable": true
        },
        {
          "name": "date_format",
          "label": "Date Format",
          "type": "string",
          "required": false,
          "createable": true,
          "updateable": true
        },
        {
          "name": "default_currency",
          "label": "Default Currency",
          "type": "string",
          "required": false,
          "createable": true,
          "updateable": true
        }
      ]
    },
    {
      "name": "subscription_status",
      "label": "Subscription Status",
      "type": "picklist",
      "required": false,
      "createable": false,
      "updateable": false,
      "options": [
        {"value": "active", "label": "Active"},
        {"value": "inactive", "label": "Inactive"},
        {"value": "trial", "label": "Trial"}
      ]
    },
    {
      "name": "subscription_plan",
      "label": "Subscription Plan",
      "type": "picklist",
      "required": false,
      "createable": false,
      "updateable": false,
      "options": [
        {"value": "basic", "label": "Basic"},
        {"value": "professional", "label": "Professional"},
        {"value": "enterprise", "label": "Enterprise"}
      ]
    }
  ]
}

Invitation Metadata

Description: Retrieve metadata about invitation fields.

Endpoint: GET api/public/v1/organizations/invitations/metadata/fields/

Response Example:

{
  "fields": [
    {
      "name": "email",
      "label": "Email",
      "type": "email",
      "required": true,
      "createable": true,
      "updateable": false
    },
    {
      "name": "role",
      "label": "Role",
      "type": "picklist",
      "required": true,
      "createable": true,
      "updateable": false,
      "options": [
        {"value": "admin", "label": "Administrator"},
        {"value": "member", "label": "Member"}
      ]
    },
    {
      "name": "permissions",
      "label": "Permissions",
      "type": "array",
      "items_type": "string",
      "required": false,
      "createable": true,
      "updateable": false
    }
  ]
}

Error Responses

  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 500 Internal Server Error: Server-side error

Data Models

User

Field
Type
Description
id
UUID
Unique identifier
first_name
String
First name
last_name
String
Last name
email
String
Email address
is_active
Boolean
Whether the user is active
role
String
User role (admin/member)
organization
UUID
Reference to organization
created
DateTime
Creation timestamp
modified
DateTime
Last modification timestamp
last_login
DateTime
Last login timestamp
profile_picture_url
String
URL to profile picture

Organization

Field
Type
Description
id
UUID
Unique identifier
name
String
Organization name
subscription_status
String
Subscription status (active/inactive/trial)
subscription_plan
String
Subscription plan (basic/professional/enterprise)
subscription_expires
DateTime
Subscription expiration date
created
DateTime
Creation timestamp
modified
DateTime
Last modification timestamp
settings
Object
Organization settings

Invitation

Field
Type
Description
id
UUID
Unique identifier
email
String
Invitee email address
role
String
Assigned role (admin/member)
organization
UUID
Reference to organization
invited_by
UUID
Reference to user who sent the invitation
status
String
Invitation status (pending/accepted/expired)
created
DateTime
Creation timestamp
expires
DateTime
Expiration timestamp
Submit
By clicking "Submit", you agree to our Terms of Service and Privacy Policy.
Logo footer
Thank you for your interest

You can download the PDF using the button below.

Oops! Something went wrong while submitting the form.