{ "openapi": "3.0.3", "info": { "description": "You can use Admin API to create and manage your Human API users", "version": "1.0.0", "title": "Admin API", "termsOfService": "https://www.humanapi.co/developer-terms", "contact": { "email": "help@humanapi.co", "url": "https://www.humanapi.co/contact" } }, "servers": [ { "url": "https://admin.humanapi.co", "description": "Production server" } ], "tags": [ { "name": "users", "description": "API endpoints to manage users", "externalDocs": { "description": "Find out more", "url": "https://reference.humanapi.co/docs/admin-api" } } ], "paths": { "/api/v1/users/{humanId}": { "get": { "tags": [ "users" ], "description": "Get the details of a specific user (by humanId)", "operationId": "getUserDetails", "parameters": [ { "$ref": "#/components/parameters/humanIdPath" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/t11mUser" } ] }, "examples": { "nonT11mUser": { "$ref": "#/components/examples/nonT11mUser" }, "t11mUser": { "$ref": "#/components/examples/t11mUser" }, "t11mUserWithDataAvailable": { "$ref": "#/components/examples/t11mUserWithDataAvailable" } } } } }, "401": { "$ref": "#/components/responses/unauthorized" }, "404": { "$ref": "#/components/responses/notFound" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": { "user": { "type": "object", "additionalProperties": false, "required": [ "humanId", "clientUserEmail", "createdAt", "updatedAt", "status" ], "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "dateOfBirth": { "type": "string", "format": "date-time", "example": "1968-02-13T00:00:00.000Z" }, "humanId": { "type": "string" }, "clientUserEmail": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string" }, "suggestedSources": { "type": "array", "items": { "type": "string" } }, "inviteLink": { "type": "string" } } }, "t11mUser": { "type": "object", "additionalProperties": false, "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "dateOfBirth": { "type": "string", "format": "date-time", "example": "1968-02-13T00:00:00.000Z" }, "humanId": { "type": "string" }, "clientUserId": { "type": "string" }, "clientUserEmail": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "suggestedSources": { "type": "array", "items": { "type": "string" } }, "orders": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/orderInfo" }, { "$ref": "#/components/schemas/orderInfoWithDataAvailable" } ] } } } }, "error": { "type": "object", "required": [ "statusCode", "error", "message", "x-humanapi-request-id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "error": { "type": "string" }, "message": { "type": "string" }, "x-humanapi-request-id": { "type": "string" } } }, "orderInfo": { "type": "object", "properties": { "orderId": { "type": "string" }, "orderType": { "type": "string" }, "orderTypeAlias": { "type": "string" }, "orderStatus": { "type": "string" }, "reportsAvailable": { "type": "boolean" } } }, "orderInfoWithDataAvailable": { "type": "object", "properties": { "orderId": { "type": "string" }, "orderType": { "type": "string" }, "orderTypeAlias": { "type": "string" }, "orderStatus": { "type": "string" }, "reportsAvailable": { "type": "boolean" }, "dataAvailable": { "type": "boolean" } } } }, "parameters": { "humanIdPath": { "name": "humanId", "in": "path", "description": "The humanId of the user", "required": true, "schema": { "type": "string" } } }, "responses": { "unauthorized": { "description": "The token provided is invalid. It may have expired or may have been revoked.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" }, "example": { "code": 401, "error": "Unauthorized", "message": "Cannot authenticate you with this token", "x-humanapi-request-id": "05518ca2-1c9a-434e-8512-7284bbc54137" } } } }, "notFound": { "description": "The specified resource was not found (e.g. the id does not exist)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" }, "example": { "code": 404, "error": "Not Found", "message": "Not Found", "x-humanapi-request-id": "05518ca2-1c9a-434e-8512-7284bbc54137" } } } } }, "examples": { "nonT11mUser": { "value": { "firstName": "Jane", "lastName": "Smith", "dateOfBirth": "1968-02-13T00:00:00.000Z", "humanId": "f0e4cfc59516be96512c3d98e48b5abf", "clientUserEmail": "jane@smith.com", "clientUserId": "jane_smith_humanapi_connect", "createdAt": "2025-02-06T12:00:00.000Z", "updatedAt": "2025-02-06T12:00:00.000Z", "status": "Invited", "suggestedSources": [ "Starfleet Medical" ] } }, "t11mUser": { "value": { "firstName": "Jane", "lastName": "Smith", "dateOfBirth": "1968-02-13T00:00:00.000Z", "humanId": "c1dc2ca616164a37b9ae5bf9f3c8884d", "clientUserEmail": "jane@smith.com", "clientUserId": "jane_smith_health_intelligence", "createdAt": "2025-02-06T12:00:00.000Z", "updatedAt": "2025-02-06T12:00:00.000Z", "suggestedSources": [ "Starfleet Medical" ], "orders": [ { "orderId": "2e9d2eaf-39c9-4182-a6fc-b076f99c75d9", "orderType": "default", "orderStatus": "Pended", "reportsAvailable": false } ] } }, "t11mUserWithDataAvailable": { "value": { "firstName": "Jane", "lastName": "Smith", "dateOfBirth": "1968-02-13T00:00:00.000Z", "humanId": "4f1bc984b859d5adc6dc3aebba899671", "clientUserEmail": "jane@smith.com", "clientUserId": "jane_smith_health_intelligence_2", "createdAt": "2025-02-06T12:00:00.000Z", "updatedAt": "2025-02-06T12:00:00.000Z", "suggestedSources": [ "Starfleet Medical" ], "orders": [ { "orderId": "08780acf-9f05-4391-8bb5-6d775efdc430", "orderType": "default", "orderStatus": "Completed", "reportsAvailable": true, "dataAvailable": true } ] } } } }, "security": [ { "bearerAuth": [] } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true } }