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>",
  "json": {},
  "tx_url": "<string>",
  "location": "<string>",
  "owner_address": "<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
title
string
required

The title of the activity.

Required string length: 1 - 100
image
file
required

The image file to upload with the activity.

collection_slug
string

The slug of the collection containing the product.

collection_id
string<uuid>

The UUID of the collection containing the product.

content
string | null

Content for the activity.

Maximum length: 500
location
string | null

The location where the activity occurred.

Maximum length: 100
owner_email
string<email>

The email of the activity's owner.

user_id
string<uuid>

The UUID of the user associated 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.

json
object | null

Additional structured data associated with the activity.

tx_url
string<uri> | null

The transaction URL if the activity is blockchain-related.

location
string | null

The physical or virtual location where the activity occurred.

owner_address
string | null

The blockchain address of the owner associated with this activity.

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.