1C Platform1cPlatform

Complete API documentation

RESTful API with comprehensive endpoints for all platform capabilities. Base URL: https://api.1cplatform.com

Authentication

Secure API key-based authentication with Bearer tokens

Rate Limits

1000 req/min standard, 5000 req/min enterprise

Global CDN

Low latency worldwide with edge locations

99.99% Uptime

Enterprise-grade reliability and monitoring

Authentication

Example Authentication
curl https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Getting Your API Key

Generate and manage API keys from your dashboard under Settings → API Keys

API Endpoints

POST
/v1/agents

Create a new AI agent with custom instructions and tools

Parameters

name
string
Required

Agent name

model
string
Required

Model (gpt-4, gpt-3.5-turbo)

instructions
string
Required

System instructions

tools
array

Available tools

temperature
float

0-1, controls randomness

Response

200 OK
{
  "id": "agent_abc123",
  "name": "customer-support",
  "model": "gpt-4",
  "status": "active",
  "created_at": "2024-01-15T10:30:00Z"
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
GET
/v1/agents

List all agents with pagination

Parameters

limit
integer

Max results (default: 20)

offset
integer

Pagination offset

status
string

Filter by status

Response

200 OK
{
  "data": [
    {
      "id": "agent_abc123",
      "name": "customer-support"
    }
  ],
  "total": 42,
  "has_more": true
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
GET
/v1/agents/{id}

Get detailed information about a specific agent

Parameters

id
string
Required

Agent ID

Response

200 OK
{
  "id": "agent_abc123",
  "name": "customer-support",
  "model": "gpt-4",
  "instructions": "Help customers...",
  "tools": [
    "knowledge_base"
  ],
  "status": "active"
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
PATCH
/v1/agents/{id}

Update agent configuration

Parameters

id
string
Required

Agent ID

name
string

New name

instructions
string

Updated instructions

Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
DELETE
/v1/agents/{id}

Permanently delete an agent

Parameters

id
string
Required

Agent ID

Response

200 OK
{
  "success": true,
  "message": "Agent deleted"
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
POST
/v1/agents/{agent_id}/conversations

Start a new conversation with an agent

Parameters

agent_id
string
Required

Agent ID

metadata
object

Custom metadata

Response

200 OK
{
  "id": "conv_xyz789",
  "agent_id": "agent_abc123",
  "created_at": "2024-01-15T10:30:00Z"
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
POST
/v1/conversations/{id}/messages

Send a message in a conversation

Parameters

id
string
Required

Conversation ID

content
string
Required

Message content

stream
boolean

Enable streaming

Response

200 OK
{
  "id": "msg_def456",
  "role": "assistant",
  "content": "Response text...",
  "created_at": "2024-01-15T10:30:05Z"
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
POST
/v1/workflows

Create an automated workflow

Parameters

name
string
Required

Workflow name

steps
array
Required

Workflow steps

triggers
array
Required

Trigger conditions

Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
GET
/v1/workflows

List all workflows

Parameters

limit
integer

Max results

offset
integer

Pagination offset

Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
POST
/v1/workflows/{id}/execute

Execute a workflow

Parameters

id
string
Required

Workflow ID

input
object
Required

Input data

Response

200 OK
{
  "execution_id": "exec_ghi789",
  "status": "running",
  "started_at": "2024-01-15T10:30:00Z"
}
Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
POST
/v1/datasets

Upload and index a dataset

Parameters

name
string
Required

Dataset name

file
file
Required

Data file

schema
object

Data schema

Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
GET
/v1/datasets

List all datasets

Parameters

limit
integer

Max results

offset
integer

Pagination offset

Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'
POST
/v1/datasets/{id}/query

Query dataset with semantic search

Parameters

id
string
Required

Dataset ID

query
string
Required

Search query

top_k
integer

Number of results

Example Request
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'

Official SDKs

Install our SDKs for your preferred language

JavaScript/TypeScript

Package

@1cplatform/sdk

Version

2.4.0
npm install @1cplatform/sdk
Python

Package

onec-sdk

Version

1.8.2
pip install onec-sdk
Go

Package

github.com/1c/go-sdk

Version

0.9.1
go get github.com/1c/go-sdk
Ruby

Package

onec-ruby

Version

1.5.0
gem install onec-ruby

Status Codes & Errors

CodeStatusDescription
200
OKRequest successful
201
CreatedResource created successfully
400
Bad RequestInvalid request parameters
401
UnauthorizedMissing or invalid API key
403
ForbiddenInsufficient permissions
404
Not FoundResource not found
429
Too Many RequestsRate limit exceeded
500
Internal Server ErrorServer error
503
Service UnavailableService temporarily unavailable

Rate Limits

Free Tier
100

requests per minute

Pro Tier
1,000

requests per minute

Enterprise
5,000+

requests per minute

Webhooks

Receive real-time notifications when events occur in your account. Configure webhook endpoints in your dashboard.

Available Events

  • agent.created
  • agent.updated
  • conversation.started
  • conversation.completed
  • workflow.executed
  • dataset.indexed

Webhook Payload

{
  "event": "agent.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "id": "agent_abc123",
    "name": "customer-support",
    "status": "active"
  }
}

Quick Start Examples

Get started in your favorite language

bash.sh
curl -X POST https://api.1cplatform.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "customer-support",
    "model": "gpt-4",
    "instructions": "Help customers with their questions",
    "tools": ["knowledge_base"]
  }'