# Company Profile

## Retrieve Company Profile

> \### Retrieve the authenticated user’s company profile\
> \
> \*\*Usage Example\*\*\
> \`\`\`bash\
> curl -H "Authorization: API-KEY \<ID-Token>" \\\
> &#x20;    -X GET <https://api.example.com/company-profile/\\>
> \`\`\`\
> \
> \*\*Response Structure\*\*\
> \- \*\*companyName\*\* \*(string, required)\* – Official name of the company.\
> \- \*\*ownerName\*\* \*(string)\* – Full name of the company owner.\
> \- \*\*role\*\* \*(string)\* – Role/position of the current user within the company.\
> \- \*\*measurement\*\* \*(string)\* – Preferred measurement system (e.g. \`metric\`).\
> \- \*\*companyLogo\*\* \*(string, URI)\* – Public URL of the logo stored in Firebase.\
> \
> \*\*Notes\*\*\
> \- Requires a valid Firebase \*\*ID token\*\* in the \`Authorization\` header.\
> \- Returns \*\*404\*\* if no profile document exists for the user.<br>

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"}}},"paths":{"/company-profile/":{"get":{"operationId":"company-profile_list","summary":"Retrieve Company Profile","description":"### Retrieve the authenticated user’s company profile\n\n**Usage Example**\n```bash\ncurl -H \"Authorization: API-KEY <ID-Token>\" \\\n     -X GET https://api.example.com/company-profile/\n```\n\n**Response Structure**\n- **companyName** *(string, required)* – Official name of the company.\n- **ownerName** *(string)* – Full name of the company owner.\n- **role** *(string)* – Role/position of the current user within the company.\n- **measurement** *(string)* – Preferred measurement system (e.g. `metric`).\n- **companyLogo** *(string, URI)* – Public URL of the logo stored in Firebase.\n\n**Notes**\n- Requires a valid Firebase **ID token** in the `Authorization` header.\n- Returns **404** if no profile document exists for the user.\n","responses":{"200":{"description":"Company profile retrieved successfully.","content":{"application/json":{"schema":{"required":["companyName"],"type":"object","properties":{"companyName":{"description":"Official name of the company.","type":"string"},"ownerName":{"description":"Full name of the company owner.","type":"string"},"role":{"description":"Primary role/position of the authenticated user in the company.","type":"string"},"measurement":{"description":"Preferred measurement system (e.g., `metric`, `imperial`).","type":"string"},"companyLogo":{"description":"Public URL of the company logo stored in Firebase Storage.","type":"string","format":"uri"}}}}}},"404":{"description":"Profile not found.","content":{"application/json":{"schema":{"required":["error"],"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"required":["error"],"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["company-profile"]}}}}
````

## Create / Replace Company Profile

> \### Create a new company profile or replace an existing one\
> \
> \*\*Accepted Content-Types\*\*\
> \- \`application/json\` – Supply profile fields directly as JSON.\
> \- \`multipart/form-data\` – Use when uploading a \*\*companyLogo\*\* file.\
> \
> \*\*Usage Example (JSON)\*\*\
> \`\`\`bash\
> curl -H "Authorization: API-KEY \<ID-Token>" \\\
> &#x20;    -H "Content-Type: application/json" \\\
> &#x20;    -d '{"companyName":"Apple Inc.","ownerName":"Mario Rossi"}' \\\
> &#x20;    -X POST <https://api.example.com/company-profile/\\>
> \`\`\`\
> \
> \*\*Usage Example (Multipart)\*\*\
> \`\`\`bash\
> curl -H "Authorization: API-KEY \<ID-Token>" \\\
> &#x20;    -F companyName="Apple Inc." \\\
> &#x20;    -F companyLogo=@logo.jpg \\\
> &#x20;    -X POST <https://api.example.com/company-profile/\\>
> \`\`\`\
> \
> \*\*Response Structure (201)\*\*\
> \- \*\*companyName\*\* \*(string)\* – Official name of the company.\
> \- \*\*ownerName\*\* \*(string)\* – Full name of the company owner.\
> \- \*\*role\*\* \*(string)\* – Role of the current user in the company.\
> \- \*\*companyLogo\*\* \*(string, URI)\* – Public URL of the uploaded logo.\
> \
> \*\*Notes\*\*\
> \- \`companyName\`, \`ownerName\`, and \`role\` are required.\
> \- If a profile already exists, fields are merged (not overwritten entirely).<br>

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"}}},"paths":{"/company-profile/":{"post":{"operationId":"company-profile_create","summary":"Create / Replace Company Profile","description":"### Create a new company profile or replace an existing one\n\n**Accepted Content-Types**\n- `application/json` – Supply profile fields directly as JSON.\n- `multipart/form-data` – Use when uploading a **companyLogo** file.\n\n**Usage Example (JSON)**\n```bash\ncurl -H \"Authorization: API-KEY <ID-Token>\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"companyName\":\"Apple Inc.\",\"ownerName\":\"Mario Rossi\"}' \\\n     -X POST https://api.example.com/company-profile/\n```\n\n**Usage Example (Multipart)**\n```bash\ncurl -H \"Authorization: API-KEY <ID-Token>\" \\\n     -F companyName=\"Apple Inc.\" \\\n     -F companyLogo=@logo.jpg \\\n     -X POST https://api.example.com/company-profile/\n```\n\n**Response Structure (201)**\n- **companyName** *(string)* – Official name of the company.\n- **ownerName** *(string)* – Full name of the company owner.\n- **role** *(string)* – Role of the current user in the company.\n- **companyLogo** *(string, URI)* – Public URL of the uploaded logo.\n\n**Notes**\n- `companyName`, `ownerName`, and `role` are required.\n- If a profile already exists, fields are merged (not overwritten entirely).\n","responses":{"201":{"description":"Profile created successfully.","content":{"application/json":{"schema":{"required":["companyName","ownerName","role"],"type":"object","properties":{"companyName":{"type":"string"},"ownerName":{"type":"string"},"role":{"type":"string"},"companyLogo":{"type":"string","format":"uri"}}}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"required":["errors"],"type":"object","properties":{"errors":{"description":"List of Pydantic validation errors.","type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"required":["error"],"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["company-profile"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"companyLogo":{"type":"string","description":"**Optional.** Image file (`jpeg`/`png`)."},"companyName":{"type":"string","description":"**Required (POST)** – Company name (text field)."},"ownerName":{"type":"string","description":"Full name of the owner (text field)."},"role":{"type":"string","description":"Role of the current user (text field)."},"measurement":{"type":"string","description":"Preferred measurement system (`metric` / `imperial`)."}},"required":[]}}}}}}}}
````

## Update Company Profile

> \### Partially update one or more profile fields\
> \
> \*\*Accepted Content-Types\*\*\
> \- \`application/json\`\
> \- \`multipart/form-data\` (for logo replacement)\
> \
> \*\*Usage Example (clear logo)\*\*\
> \`\`\`bash\
> curl -H "Authorization: API-KEY \<ID-Token>" \\\
> &#x20;    -H "Content-Type: application/json" \\\
> &#x20;    -d '{"companyLogo":""}' \\\
> &#x20;    -X PATCH <https://api.example.com/company-profile/\\>
> \`\`\`\
> \
> \*\*Usage Example (replace logo)\*\*\
> \`\`\`bash\
> curl -H "Authorization: API-KEY \<ID-Token>" \\\
> &#x20;    -F companyLogo=@new\_logo.png \\\
> &#x20;    -X PATCH <https://api.example.com/company-profile/\\>
> \`\`\`\
> \
> \*\*Response Structure (200)\*\*\
> \- \*\*companyName\*\* \*(string)\* – Official name of the company.\
> \- \*\*ownerName\*\* \*(string)\* – Full name of the company owner.\
> \- \*\*role\*\* \*(string)\* – Role of the current user in the company.\
> \- \*\*companyLogo\*\* \*(string, URI)\* – Public URL of the updated logo.\
> \
> \*\*Notes\*\*\
> \- Only the supplied fields are modified; unspecified fields remain unchanged.\
> \- Providing an empty string (\`""\`) for \*\*companyLogo\*\* removes the logo.<br>

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"}}},"paths":{"/company-profile/":{"patch":{"operationId":"company-profile_partial_update","summary":"Update Company Profile","description":"### Partially update one or more profile fields\n\n**Accepted Content-Types**\n- `application/json`\n- `multipart/form-data` (for logo replacement)\n\n**Usage Example (clear logo)**\n```bash\ncurl -H \"Authorization: API-KEY <ID-Token>\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"companyLogo\":\"\"}' \\\n     -X PATCH https://api.example.com/company-profile/\n```\n\n**Usage Example (replace logo)**\n```bash\ncurl -H \"Authorization: API-KEY <ID-Token>\" \\\n     -F companyLogo=@new_logo.png \\\n     -X PATCH https://api.example.com/company-profile/\n```\n\n**Response Structure (200)**\n- **companyName** *(string)* – Official name of the company.\n- **ownerName** *(string)* – Full name of the company owner.\n- **role** *(string)* – Role of the current user in the company.\n- **companyLogo** *(string, URI)* – Public URL of the updated logo.\n\n**Notes**\n- Only the supplied fields are modified; unspecified fields remain unchanged.\n- Providing an empty string (`\"\"`) for **companyLogo** removes the logo.\n","responses":{"200":{"description":"Profile updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"companyName":{"type":"string"},"ownerName":{"type":"string"},"role":{"type":"string"},"companyLogo":{"type":"string","format":"uri"}}}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"required":["errors"],"type":"object","properties":{"errors":{"description":"List of Pydantic validation errors.","type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"required":["error"],"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["company-profile"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"companyLogo":{"type":"string","description":"**Optional.** Image file (`jpeg`/`png`)."},"companyName":{"type":"string","description":"**Required (POST)** – Company name (text field)."},"ownerName":{"type":"string","description":"Full name of the owner (text field)."},"role":{"type":"string","description":"Role of the current user (text field)."},"measurement":{"type":"string","description":"Preferred measurement system (`metric` / `imperial`)."}},"required":[]}}}}}}}}
````

## Retrieve Organization Status

> \### Retrieve Organization Status\
> \
> This endpoint allows an authenticated user (admin or sub-admin) to retrieve organization status details. The response includes various details such as the session number, user UID, role, payment type, and associated activities. \
> \
> \*\*Response Structure (HTTP 200):\*\*\
> \- \*\*session\_number\*\* \*(integer)\*: The number of sessions associated with the organization.\
> \- \*\*uid\*\* \*(string)\*: The unique identifier of the authenticated user.\
> \- \*\*role\*\* \*(string)\*: The role of the user, which can be either \`admin\` or \`sub\_admin\`.\
> \- \*\*payment\_type\*\* \*(string)\*: The type of payment plan for the organization.\
> \- \*\*activity\*\* \*(array of strings)\*: A list of activities associated with the organization.\
> \- \*\*companyName\*\* \*(string or null)\*: The name of the company, if available.\
> \- \*\*name\*\* \*(string or null)\*: The name of the user.\
> \
> \*\*Example Successful Response:\*\*\
> \`\`\`json\
> {\
> &#x20; "session\_number": 50,\
> &#x20; "uid": "aB3xYz1PqW8LmTnK4R9VfJ0gHsCd",\
> &#x20; "role": "admin",\
> &#x20; "payment\_type": "Enterprise",\
> &#x20; "activity": \["Running", "Weightlifting", "VerticalJump", "MobilityAssessment"],\
> &#x20; "companyName": "Apple",\
> &#x20; "name": "Username"\
> }\
> \`\`\`\
> \
> \*\*Notes:\*\*\
> \- A valid API-KEY token is required to access this endpoint.\
> \- If the organization status is not found or the data is invalid (e.g. missing session\_number), a 404 error is returned.

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/company-profile/organization-status/":{"get":{"operationId":"company-profile_organization-status_list","summary":"Retrieve Organization Status","description":"### Retrieve Organization Status\n\nThis endpoint allows an authenticated user (admin or sub-admin) to retrieve organization status details. The response includes various details such as the session number, user UID, role, payment type, and associated activities. \n\n**Response Structure (HTTP 200):**\n- **session_number** *(integer)*: The number of sessions associated with the organization.\n- **uid** *(string)*: The unique identifier of the authenticated user.\n- **role** *(string)*: The role of the user, which can be either `admin` or `sub_admin`.\n- **payment_type** *(string)*: The type of payment plan for the organization.\n- **activity** *(array of strings)*: A list of activities associated with the organization.\n- **companyName** *(string or null)*: The name of the company, if available.\n- **name** *(string or null)*: The name of the user.\n\n**Example Successful Response:**\n```json\n{\n  \"session_number\": 50,\n  \"uid\": \"aB3xYz1PqW8LmTnK4R9VfJ0gHsCd\",\n  \"role\": \"admin\",\n  \"payment_type\": \"Enterprise\",\n  \"activity\": [\"Running\", \"Weightlifting\", \"VerticalJump\", \"MobilityAssessment\"],\n  \"companyName\": \"Apple\",\n  \"name\": \"Username\"\n}\n```\n\n**Notes:**\n- A valid API-KEY token is required to access this endpoint.\n- If the organization status is not found or the data is invalid (e.g. missing session_number), a 404 error is returned.","responses":{"200":{"description":"Organization status details retrieved successfully.","content":{"application/json":{"schema":{"required":["session_number","uid","role","payment_type","activity","companyName","name"],"type":"object","properties":{"session_number":{"description":"The number of sessions associated with the organization.","type":"integer"},"uid":{"description":"The unique identifier of the authenticated user.","type":"string"},"role":{"description":"The user's role; either 'admin' or 'sub_admin'.","type":"string"},"payment_type":{"description":"The payment plan type for the organization.","type":"string"},"activity":{"description":"A list of activities associated with the organization.","type":"array","items":{"description":"An activity associated with the organization.","type":"string"}},"companyName":{"description":"The name of the company, if available.","type":"string"},"name":{"description":"The name of the user, if available.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating authentication failure.","type":"string"}}}}}},"403":{"description":"Forbidden - The requester does not have sufficient privileges.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"404":{"description":"Not Found - The user was not found or the organization status data is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message describing the issue.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["company-profile"]}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aikynetix.app/api-documentation/developer-resources-and-api-reference/api-reference/v.2/company-profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
