Fluid Rep APIs (1.0)

The Fluid Rep APIs provide endpoints for authenticated Reps (Users) to access their own data and perform actions on their behalf.

Authentication

These APIs use User tokens for authentication. User tokens are obtained through:

  • Magic link authentication
  • JWT exchange (/api/user_companies/jwt_exchange)
  • Token exchange (/api/user_companies/token_exchange)

Unlike Company APIs which use Company API tokens for administrative access, Rep APIs authenticate the individual user and provide access to their personal data, orders, team, and settings.

For Company-level management APIs, see the Company APIs documentation.

Download OpenAPI description
Overview
E-mail support@fluid.app
License MIT
Languages
Servers
Mock server
https://docs.fluid.app/_mock/docs/apis/rep/
Production server with company subdomain
https://{company}.fluid.app/
Local development server
http://fluid.lvh.me:{port}/

Authentication

Operations

Send MFA Passcode

Request

Send MFA Passcode via email

Query
emailstringrequired

Email address of the user

fluid_shopstring

Shop name, eg: company.fluid.app

curl -i -X POST \
  'https://docs.fluid.app/_mock/docs/apis/rep/api/authentication/send_mfa?email=string&fluid_shop=string'

Responses

generic success response

Bodyapplication/json
multi_factor_authenticationobject(MultiFactorAuthentication)required
multi_factor_authentication.​uuidstringrequired
multi_factor_authentication.​authenticatedbooleanrequired
multi_factor_authentication.​verification_channelstringrequired
multi_factor_authentication.​verification_code_expires_atstring
metaobject
Response
application/json
{ "multi_factor_authentication": { "uuid": "string", "authenticated": true, "verification_channel": "string", "verification_code_expires_at": "string" }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }

Confirm MFA passcode

Request

Confirm MFA Passcode

Bodyapplication/json
uuidstringrequired
Example: "drp_p4r9jsl305iduqrsl0ujdth35jhuy2al"
multi_factor_authenticationobjectrequired
multi_factor_authentication.​verification_codestringrequired
Example: "543432"
curl -i -X POST \
  https://docs.fluid.app/_mock/docs/apis/rep/api/authentication/confirm_mfa \
  -H 'Content-Type: application/json' \
  -d '{
    "uuid": "drp_p4r9jsl305iduqrsl0ujdth35jhuy2al",
    "multi_factor_authentication": {
      "verification_code": "543432"
    }
  }'

Responses

MFA code confirmed

Bodyapplication/json
authenticatedbooleanrequired
Example: true
auth_typestringrequired
Example: "rep"
companiesArray of objectsrequired
companies[].​idintegerrequired
Example: 1
companies[].​namestringrequired
Example: "John Doe"
companies[].​shop_namestringrequired
Example: "myco.fluid.app"
companies[].​logo_urlstring or null
Example: "https://example.com/logo.png"
companies[].​jwtstringrequired
Example: "eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX..."
companies[].​primary_domain_hostnamestring
Example: "myco.fluid.app"
metaobject
Response
application/json
{ "authenticated": true, "auth_type": "rep", "companies": [ {} ], "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2025-02-03T08:04:10Z" } }

Fetch user details from JWT

Request

Query
jwtstringrequired
curl -i -X GET \
  'https://docs.fluid.app/_mock/docs/apis/rep/api/authentication/me?jwt=string'

Responses

user details given

Bodyapplication/json
userobject
user_companyobject
metaobject
Response
application/json
{ "user": { "id": 1, "first_name": "Mike", "last_name": "Tingey", "email": "mike@example.com", "avatar_url": "https://d1r16g5m5p3ba7.cloudfront.net/uploads/user/avatar/980190962/avatar.png", "root_admin": true }, "user_company": { "id": 1, "company_id": 226157151, "company_name": "Fluid", "roles": "[\"admin\", \"developer\"]", "user_type": "admin", "logo_url": "https://cdn.filestackcontent.com/1Rnqia44T2mLcXuFZCTV", "icon_url": "https://cdn.filestackcontent.com/1Rnqia44T2mLcXuFZCTV", "fluid_shop": "myco.fluid.app", "company_colors": {} }, "meta": { "request_id": "72591788-c981-47d1-8dd5-1cc0e1612815", "timestamp": "2025-05-08T06:18:09Z" } }

Resend code via email

Request

Query
uuidstringrequired

Current MFA uuid

curl -i -X POST \
  'https://docs.fluid.app/_mock/docs/apis/rep/api/authentication/resend_mfa?uuid=string'

Responses

verification code resent

Bodyapplication/json
multi_factor_authenticationobject(MultiFactorAuthentication)required
multi_factor_authentication.​uuidstringrequired
multi_factor_authentication.​verification_channelstringrequired
Example: "test@example.com"
multi_factor_authentication.​verification_code_expires_atstring or null(date-time)
Example: "2025-02-17T08:00:01Z"
multi_factor_authentication.​authenticatedbooleanrequired
Default false
Example: "false"
metaobject
Response
application/json
{ "multi_factor_authentication": { "uuid": "string", "verification_channel": "test@example.com", "verification_code_expires_at": "2025-02-17T08:00:01Z", "authenticated": "false" }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }

Fetch company details from Fluid Shop name

Request

Path
fluid_shopstringrequired

Fluid shop name

Example: myco
curl -i -X GET \
  'https://docs.fluid.app/_mock/docs/apis/rep/api/authentication/company/{fluid_shop}'

Responses

company details given

Bodyapplication/json
companyobject
metaobject
Response
application/json
{ "company": { "name": "string", "logo_url": "https://example.com/logo.png", "color": "#000000", "fluid_shop": "myco.fluid.app", "primary_domain_hostname": "myco.com" }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2025-02-03T08:04:10Z" } }

Switch company

Request

Path
company_idintegerrequired

Company id

Example: 980190965
curl -i -X PUT \
  'https://docs.fluid.app/_mock/docs/apis/rep/api/authentication/company/{company_id}/switch' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

New company details with jwt given

Bodyapplication/json
companyobjectrequired
company.​idintegerrequired
Example: 1
company.​namestringrequired
Example: "fluid"
company.​fluid_shopstringrequired
Example: "myco.fluid.app"
company.​logo_urlstring or nullrequired
Example: "https://example.com/logo.png"
company.​jwtstringrequired
Example: "eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX..."
company.​redirect_pathstringrequired
Example: "/admin/dashboard"
metaobjectrequired
meta.​request_idstring
Example: "f5473a8c-8a86-4e0e-b3e8-95392003921b"
meta.​timestampstring
Example: "2025-02-03T08:04:10Z"
Response
application/json
{ "company": { "id": 1, "name": "fluid", "fluid_shop": "myco.fluid.app", "logo_url": "https://example.com/logo.png", "jwt": "eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...", "redirect_path": "/admin/dashboard" }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2025-02-03T08:04:10Z" } }

User Profile

Operations

Contacts

Operations

Tasks

Operations

Media

Operations

Libraries

Operations

Orders

Operations

MySite

Operations

Analytics

Operations

Events

Operations

Training

Operations