curl --request POST \
--url 'https://api.nsr.stateset.com/v1/files' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"content": "Two-person tent, green — replacement for damaged pole set.",
"content_base64": "string",
"content_type": "string",
"filename": "string",
"metadata": {},
"purpose": "string"
}'
{
"bytes": 1,
"content_type": "string",
"created_at": 1,
"filename": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": {},
"object": "string",
"purpose": "string",
"status": "pending"
}
Create a file handler
Required scope: write
POST
/
v1
/
files
curl --request POST \
--url 'https://api.nsr.stateset.com/v1/files' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"content": "Two-person tent, green — replacement for damaged pole set.",
"content_base64": "string",
"content_type": "string",
"filename": "string",
"metadata": {},
"purpose": "string"
}'
{
"bytes": 1,
"content_type": "string",
"created_at": 1,
"filename": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": {},
"object": "string",
"purpose": "string",
"status": "pending"
}
Required scope:
write
Request body
CreateFileRequest
string
string
string
string
required
object
string
Response
FileObject
integer
required
string
integer (int64)
required
string
required
string
required
object
string
required
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
201 | File uploaded |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/v1/files' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"content": "Two-person tent, green — replacement for damaged pole set.",
"content_base64": "string",
"content_type": "string",
"filename": "string",
"metadata": {},
"purpose": "string"
}'
{
"bytes": 1,
"content_type": "string",
"created_at": 1,
"filename": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": {},
"object": "string",
"purpose": "string",
"status": "pending"
}
Last modified on August 31, 2026