Skip to main content
POST
/
v1
/
activities
Create an activity
curl --request POST \
  --url https://api.oneofnone.io/v1/activities \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form token_id=2 \
  --form 'collection_slug=<string>' \
  --form collection_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form 'title=<string>' \
  --form 'content=<string>' \
  --form 'location=<string>' \
  --form owner_email=jsmith@example.com \
  --form user_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form image='@example-file'
{
  "id": 123,
  "type": "CREATOR",
  "title": "<string>",
  "content": "<string>",
  "location": "<string>",
  "token_id": 123,
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "image": {
    "alt": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "file_type": "<string>",
    "id": 123,
    "poster_url": "<string>",
    "size": 123,
    "tags": [
      "<string>"
    ],
    "thumbnail_url": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "url": "<string>"
  },
  "video": {
    "alt": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "file_type": "<string>",
    "id": 123,
    "poster_url": "<string>",
    "size": 123,
    "tags": [
      "<string>"
    ],
    "thumbnail_url": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "url": "<string>"
  },
  "gallery": [
    {
      "alt": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "file_type": "<string>",
      "id": 123,
      "poster_url": "<string>",
      "size": 123,
      "tags": [
        "<string>"
      ],
      "thumbnail_url": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "url": "<string>",
      "order": 123,
      "variants": [
        "<string>"
      ],
      "type": "<string>",
      "caption": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

The API key required for accessing protected routes. It should be included in the request headers as x-api-key.

Body

multipart/form-data
token_id
integer
required

The token ID of the product associated with the activity.

Required range: x >= 1
collection_slug
string

The slug of the collection. Either collection_slug or collection_id must be provided.

collection_id
string<uuid>

The UUID of the collection. Either collection_slug or collection_id must be provided.

title
string

Optional title for the activity.

Maximum string length: 100
content
string | null

Content for the activity.

Maximum string length: 500
location
string | null

The location where the activity occurred.

Maximum string length: 100
owner_email
string<email>

The email of the activity's owner. Either owner_email or user_id must be provided.

user_id
string<uuid>

The UUID of the user. Either owner_email or user_id must be provided.

image
file

Optional image file to upload with the activity.

Response

Activity created successfully.

id
integer

The unique identifier for the activity.

type
enum<string>

The type of activity that occurred.

Available options:
CREATOR,
CUSTOMER,
BLOCKCHAIN,
SYSTEM
title
string | null

The title or headline for the activity.

content
string | null

The main content or description of the activity.

location
string | null

The physical or virtual location where the activity occurred.

token_id
integer | null

The unique identifier of the product/token associated with this activity.

user_id
string<uuid> | null

The unique identifier of the user who performed or is associated with this activity.

image
object

The image media associated with the activity. Note that only the url field is populated in activity responses.

video
object

The video media associated with the activity. Note that only the url and poster_url fields are populated in activity responses.

The gallery items related to the activity. Note that only url, file_type, poster_url, and order fields are populated in activity responses.

created_at
string<date-time>

The timestamp when the activity was created.

updated_at
string<date-time> | null

The timestamp when the activity was last updated.