Structify account API
All the accessible information about your account through our API
All the accessible information about your account through our API
openapi: 3.0.3
info:
contact:
email: team@structify.ai
name: Structify Team
description: Every enterprise's data team.
license:
name: Discuss directly with founders for license.
url: https://structify.ai
title: Structify account API
version: 0.1.0
servers:
- description: Production server
url: https://api.structify.ai
- description: Local server
url: http://localhost:8080
security:
- api_key: []
- session_token: []
tags:
- description: All the accessible information about your account through our API
name: account
paths:
/user/api_keys:
get:
operationId: api_keys_list
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListApiKeysResponse'
description: API keys listed successfully
'401':
description: Unauthorized
'500':
description: Internal server error
security:
- session_token: []
- api_key: []
tags:
- account
post:
operationId: api_keys_create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateApiKeyRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CreateApiKeyResponse'
description: API key created successfully
'400':
description: Bad request
'401':
description: Unauthorized
'500':
description: Internal server error
security:
- session_token: []
- api_key: []
tags:
- account
/user/api_keys/{id}:
delete:
operationId: api_keys_revoke
parameters:
- description: API key ID
in: path
name: id
required: true
schema:
$ref: '#/components/schemas/ApiKeyId'
responses:
'200':
description: API key revoked successfully
'401':
description: Unauthorized
'404':
description: API key not found
'500':
description: Internal server error
security:
- session_token: []
- api_key: []
tags:
- account
get:
operationId: api_keys_get
parameters:
- description: API key ID
in: path
name: id
required: true
schema:
$ref: '#/components/schemas/ApiKeyId'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyInfo'
description: API key retrieved successfully
'401':
description: Unauthorized
'404':
description: API key not found
'500':
description: Internal server error
security:
- session_token: []
- api_key: []
tags:
- account
/user/info:
get:
operationId: user_info
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserInfoResponse'
description: Got user data successfully
security:
- session_token: []
- api_key: []
summary: Enable a source
tags:
- account
/user/jwt_to_api_token/{jwt}:
post:
description: 'JWTs are commonly used for authentication in web applications. They contain
encoded information about the user and are typically short-lived for security reasons.
This endpoint exists to allow clients who have authenticated via JWT (e.g., through
Supabase) to obtain a long-lived API token. The API token can then be used
for subsequent requests to the API without requiring frequent re-authentication.
This conversion process enhances security by separating the authentication mechanism
(JWT) from the API access mechanism (API token), while providing a seamless experience
for users transitioning from web-based authentication to API usage.'
operationId: user_jwt_to_api_token
parameters:
- description: JWT to convert to API token
in: path
name: jwt
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JwtToApiTokenRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
description: Converted JWT to API token
summary: Converts a JWT (JSON Web Token) to an API token.
tags:
- account
/user/onboarding/answers:
get:
operationId: get_onboarding_answers
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetOnboardingAnswersResponse'
description: Onboarding answers retrieved successfully
'401':
description: Unauthorized
security:
- api_key: []
- session_token: []
tags:
- account
put:
operationId: save_onboarding_answers
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SaveOnboardingAnswersRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SaveOnboardingAnswersResponse'
description: Onboarding answers saved successfully
'401':
description: Unauthorized
security:
- api_key: []
- session_token: []
tags:
- account
/user/refresh:
post:
description: 'This endpoint allows clients to extend their session by providing both the current
session token and refresh token. Upon successful refresh, a new session token is issued
and the old session is revoked.'
operationId: refresh_session
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RefreshSessionRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RefreshSessionResponse'
description: Session refreshed successfully
summary: Refreshes an expired or expiring session token.
tags:
- account
/user/survey/submit:
post:
operationId: submit_survey
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SurveySubmissionRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SurveySubmissionResponse'
description: Survey submitted successfully
'400':
description: Bad request
'401':
description: Unauthorized
security:
- api_key: []
- session_token: []
summary: Submit user onboarding survey
tags:
- account
components:
schemas:
SaveOnboardingAnswersRequest:
properties:
answers:
$ref: '#/components/schemas/OnboardingAnswers'
required:
- answers
type: object
CreateApiKeyResponse:
properties:
api_key:
$ref: '#/components/schemas/ApiKeyInfo'
raw_key:
type: string
required:
- api_key
- raw_key
type: object
SaveOnboardingAnswersResponse:
properties:
answers:
$ref: '#/components/schemas/OnboardingAnswers'
required:
- answers
type: object
UserType:
enum:
- admin
- public
- end_user
type: string
JwtToApiTokenRequest:
properties:
full_name:
nullable: true
type: string
invitation_token:
format: uuid
nullable: true
type: string
type: object
ApiKeyId:
format: uuid
type: string
MembershipId:
format: uuid
type: string
ApiKeyInfo:
properties:
created_at:
format: date-time
type: string
expires_at:
format: date-time
nullable: true
type: string
id:
$ref: '#/components/schemas/ApiKeyId'
last_used_at:
format: date-time
nullable: true
type: string
membership_id:
$ref: '#/components/schemas/MembershipId'
name:
nullable: true
type: string
revoked_at:
format: date-time
nullable: true
type: string
required:
- id
- membership_id
- created_at
type: object
UserId:
format: uuid
type: string
RefreshSessionResponse:
properties:
expires_at:
type: string
refresh_token:
type: string
refresh_token_expires_at:
type: string
session_token:
type: string
required:
- session_token
- refresh_token
- expires_at
- refresh_token_expires_at
type: object
RefreshSessionRequest:
properties:
refresh_token:
type: string
session_token:
type: string
required:
- session_token
- refresh_token
type: object
SurveySubmissionResponse:
properties:
message:
type: string
success:
type: boolean
required:
- success
- message
type: object
Permission:
enum:
- labeler
- qa_labeler
- debug
- human_llm
- none
type: string
UserInfoResponse:
properties:
company_description:
nullable: true
type: string
company_name:
nullable: true
type: string
completed_onboarding:
type: boolean
cost_confirmation_threshold:
description: Cost confirmation threshold in credits (thousandth of a cent).
format: int64
nullable: true
type: integer
credits_remaining:
format: int64
type: integer
credits_used:
format: int32
minimum: 0
type: integer
feature_flags:
items:
$ref: '#/components/schemas/FeatureFlag'
type: array
full_name:
type: string
impersonated_by_email:
nullable: true
type: string
job_title:
nullable: true
type: string
last_selected_team_id:
allOf:
- $ref: '#/components/schemas/TeamId'
nullable: true
linkedin_url:
nullable: true
type: string
notify_for_interaction:
type: boolean
permissions:
items:
$ref: '#/components/schemas/Permission'
type: array
slack_user_id:
nullable: true
type: string
slack_username:
nullable: true
type: string
survey_completed_at:
format: date-time
nullable: true
type: string
teams_user_id:
nullable: true
type: string
teams_user_name:
nullable: true
type: string
user_id:
$ref: '#/components/schemas/UserId'
user_type:
$ref: '#/components/schemas/UserType'
username:
type: string
required:
- user_id
- username
- user_type
- credits_used
- credits_remaining
- permissions
- feature_flags
- full_name
- completed_onboarding
- notify_for_interaction
type: object
TokenResponse:
properties:
permissions:
items:
$ref: '#/components/schemas/Permission'
type: array
refresh_token:
type: string
session_expires_at:
type: string
session_token:
type: string
required:
- permissions
- session_token
- refresh_token
- session_expires_at
type: object
OnboardingAnswers:
properties:
company_name:
nullable: true
type: string
connected_connector_ids:
items:
type: string
nullable: true
type: array
full_name:
nullable: true
type: string
primary_goal:
nullable: true
type: string
recommended_template_id:
nullable: true
type: string
role:
nullable: true
type: string
systems_to_connect:
items:
type: string
nullable: true
type: array
type: object
GetOnboardingAnswersResponse:
properties:
answers:
$ref: '#/components/schemas/OnboardingAnswers'
required:
- answers
type: object
ListApiKeysResponse:
properties:
api_keys:
items:
$ref: '#/components/schemas/ApiKeyInfo'
type: array
required:
- api_keys
type: object
CreateApiKeyRequest:
properties:
expires_at:
format: date-time
nullable: true
type: string
membership_id:
allOf:
- $ref: '#/components/schemas/MembershipId'
nullable: true
name:
nullable: true
type: string
type: object
FeatureFlag:
enum:
- functional_test
- pdf_parsing
- boredm_construction_model
- generic_suspicious_queue
- new_use_case_preview
- bedrock_codegen
- cerebras_codegen
- gemini25pro
- claude_sonnet4
- allow_job_deletion
- none
type: string
SurveySubmissionRequest:
properties:
survey_response:
additionalProperties: true
type: object
x-stainless-empty-object: true
required:
- survey_response
type: object
TeamId:
format: uuid
type: string
securitySchemes:
api_key:
in: header
name: api_key
type: apiKey
session_token:
scheme: bearer
type: http