YouTube API

REST4 actionsNetwork code YOUTUBE

Create and track tasks for YouTube videos and channels. Every YouTube action is one create-task call with its own type; the cards below have the request body for each.

Base URL and auth

Base URL
https://aaas.market/api/public-api/
Auth header
X-API-Key: your_api_key_here
social_network_code
YOUTUBE
Post URL example
https://www.youtube.com/watch?v=dQw4w9WgXcQ
Profile URL example
https://www.youtube.com/@username

All API requests require authentication using your API key. Include it in the request header or as a query parameter. How to get a key

Accepted URLs contain

  • youtube.com/watch post
  • youtu.be/ post
  • youtube.com/@ profile
  • youtube.com/channel/ profile

YouTube actions

Send one of these bodies to POST create-task/.

type: LIKEPOSTcreate-task/

YouTube Like Post

Target:
Post URL
Min price per action:
2 points
Request body · JSON
{
  "social_network_code": "YOUTUBE",
  "type": "LIKE",
  "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "actions_required": 10,
  "price": 2,
  "is_pinned": false
}
type: COMMENTPOSTcreate-task/

YouTube Comment Post

Target:
Post URL
Min price per action:
4 points (64 points meaningful)
Request body · JSON
{
  "social_network_code": "YOUTUBE",
  "type": "COMMENT",
  "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "actions_required": 1,
  "price": 64,
  "is_pinned": false,
  "meaningful_comment": true,
  "meaningful_comments": [
    {
      "text": "Great post, thanks for sharing!"
    }
  ]
}
type: SAVEPOSTcreate-task/

YouTube Save Post

Target:
Post URL
Min price per action:
4 points
Request body · JSON
{
  "social_network_code": "YOUTUBE",
  "type": "SAVE",
  "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "actions_required": 10,
  "price": 4,
  "is_pinned": false
}
type: SUBSCRIBEPOSTcreate-task/

YouTube Subscribe to User

Target:
Profile URL
Min price per action:
4 points
Request body · JSON
{
  "social_network_code": "YOUTUBE",
  "type": "SUBSCRIBE",
  "post_url": "https://www.youtube.com/@username",
  "actions_required": 10,
  "price": 4,
  "is_pinned": false
}
type: MULTI_ACTIONPOSTcreate-task/

YouTube bundle of actions on one post

Target:
Post URL, several actions
Request body · JSON
{
  "social_network_code": "YOUTUBE",
  "type": "MULTI_ACTION",
  "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "multi_action_items": [
    {
      "action_type": "LIKE",
      "price": 2,
      "actions_required": 10
    },
    {
      "action_type": "COMMENT",
      "price": 4,
      "actions_required": 10
    },
    {
      "action_type": "SAVE",
      "price": 4,
      "actions_required": 10
    },
    {
      "action_type": "SUBSCRIBE",
      "price": 4,
      "actions_required": 10
    }
  ]
}

Task endpoints

Create a task, track its progress and delete it. All three use your API key.

POSTcreate-task/

Create a YouTube task

Create a new task to be completed by the community. You need sufficient balance and available task slots to create a task. For a single action use type + price + actions_required. For multi-action bundles set type to MULTI_ACTION and pass multi_action_items (at least two distinct actions on the same post URL).

Auth: X-API-Key header

  • X-API-Key
    headerstringrequired

    Your API key.

  • Content-Type
    headerstringrequired
    • application/json
  • social_network_code
    bodystringrequired

    Use YOUTUBE for YouTube.

    • YOUTUBE
  • type
    bodystringrequired

    Action type: LIKE, COMMENT, FOLLOW, etc., or MULTI_ACTION for bundles

    • LIKE
    • COMMENT
    • SAVE
    • SUBSCRIBE
    • MULTI_ACTION
  • post_url
    bodystringrequired

    URL of the post or profile

  • actions_required
    bodynumbersometimes

    Number of actions needed (number, required for single-action tasks, min: 1). Ignored for MULTI_ACTION — totals are computed from multi_action_items.

  • price
    bodynumbersometimes

    Price per action in points (number, required for single-action tasks, min: 2). Ignored for MULTI_ACTION — totals are computed from multi_action_items.

  • multi_action_items
    bodyarraysometimes

    Required for MULTI_ACTION. Array of at least two objects: [{"action_type": "LIKE", "price": 2, "actions_required": 10}, {"action_type": "COMMENT", "price": 64, "actions_required": 1, "meaningful_comment": true, "meaningful_comments": [{"text": "your comment"}]}]. Each action_type must be unique and supported on the social network. Per-action meaningful_comment is only allowed on COMMENT items.

  • meaningful_comment
    bodybooleanoptional

    Require executors to post a specific comment text. Only for COMMENT tasks (boolean, optional, default: false)

  • meaningful_comments
    bodyarraysometimes

    Comment texts when meaningful_comment is true. Provide at least one non-empty comment per actions_required slot. Format: [{"text": "your comment"}] (array, required if meaningful_comment is true)

  • long_comment
    bodybooleanoptional

    Use unique comments from the aaas.market long-comment bank (boolean, optional, default: true for eligible COMMENT tasks). Cannot be enabled with meaningful_comment.

  • is_pinned
    bodybooleanoptional

    Pin task to top of the feed (boolean, optional, default: false)

Request · curl
curl -X POST "https://aaas.market/api/public-api/create-task/" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "social_network_code": "YOUTUBE",
  "type": "LIKE",
  "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "actions_required": 10,
  "price": 2,
  "is_pinned": false
}'
Response 201
{
  "success": true,
  "task_id": 12345,
  "message": "Task created successfully",
  "task": {
    "id": 12345,
    "creator": 1,
    "type": "LIKE",
    "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "price": 2,
    "actions_required": 10,
    "actions_completed": 0,
    "original_price": 10,
    "social_network_code": "YOUTUBE",
    "status": "ACTIVE",
    "bonus_actions": 2,
    "bonus_actions_completed": 0,
    "created_at": "2024-12-25T10:30:00Z"
  }
}

Errors

  • 400Price below minimum for action type
    Error 400
    {
      "detail": "price: Ensure this value is greater than or equal to 2 (for LIKE action)"
    }
  • 400Validation error or insufficient balance
    Error 400
    {
      "detail": "Insufficient balance to create task"
    }
  • 400Duplicate task exists
    Error 400
    {
      "detail": "A task with this URL and action type already exists and is being completed by our community",
      "existing_task_id": 12344
    }
  • 400Missing required fields
    Error 400
    {
      "detail": "Missing required field: social_network_code"
    }
  • 401Authentication failed
    Error 401
    {
      "detail": "Invalid or missing API key"
    }
  • 400Invalid multi_action_items
    Error 400
    {
      "success": false,
      "error": "multi_action_items must be a list with at least two actions"
    }
  • 400Meaningful comment validation failed
    Error 400
    {
      "success": false,
      "error": "meaningful_comments is required when meaningful_comment is enabled. Format: [{\"text\": \"comment text\"}]"
    }
GETtask-status/{task_id}/

Get Task Status

Get the status and details of one or more tasks. You can query a single task by ID or multiple tasks using comma-separated IDs. Use this endpoint to track task progress and completion. For meaningful COMMENT tasks (single-action or inside MULTI_ACTION bundles), the response includes answer_url and action_completions with submitted_comment, comment_url, and answer_url for each completed action.

Auth: X-API-Key header

  • X-API-Key
    headerstringrequired

    Your API key.

  • task_id
    pathstringrequired

    Single task ID or comma-separated IDs (e.g., '123' or '123,124,125')

Request · curl
curl -X GET "https://aaas.market/api/public-api/task-status/12345/" \
  -H "X-API-Key: your_api_key_here"
Response 200
{
  "id": 12345,
  "creator": 1,
  "type": "LIKE",
  "post_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "price": 2,
  "actions_required": 10,
  "actions_completed": 7,
  "original_price": 10,
  "social_network": {
    "id": 1,
    "code": "YOUTUBE",
    "name": "YouTube"
  },
  "status": "ACTIVE",
  "bonus_actions": 2,
  "bonus_actions_completed": 1,
  "is_pinned": false,
  "created_at": "2024-12-25T10:30:00Z",
  "completed_at": null,
  "progress_percentage": 70,
  "remaining_actions": 3
}

Errors

  • 404Task not found
    Error 404
    {
      "detail": "Task not found or not owned by user"
    }
  • 401Authentication failed
    Error 401
    {
      "detail": "Invalid or missing API key"
    }
DELETEdelete-task/{task_id}/

Delete Task

Delete a task you created. Marks the task as DELETED, refunds unused points for incomplete actions, and restores one available task slot — same behavior as deleting a task in the dashboard.

Auth: X-API-Key header

  • X-API-Key
    headerstringrequired

    Your API key.

  • task_id
    pathstringrequired

    Task ID to delete (must belong to your account)

Request · curl
curl -X DELETE "https://aaas.market/api/public-api/delete-task/12345/" \
  -H "X-API-Key: your_api_key_here"
Response 200
{
  "success": true,
  "refunded_points": 80,
  "new_balance": 1200,
  "new_available_tasks": 3,
  "task_id": 12345,
  "task_status": "DELETED",
  "message": "Task deleted successfully."
}

Errors

  • 400Task cannot be deleted
    Error 400
    {
      "success": false,
      "error": "Task is already completed and cannot be deleted."
    }
  • 404Task not found
    Error 404
    {
      "success": false,
      "error": "Task not found or you do not have permission to delete it."
    }
  • 401Authentication failed
    Error 401
    {
      "success": false,
      "error": "Invalid or missing API key. Provide X-API-Key header or api_key parameter."
    }

API keys

Create and list keys with the session token you get after signing in.

POSTgenerate-key/

Generate API Key

Generate an API key to authenticate your requests. Keep your key secure and never share it publicly. Each user can have only one active API key.

Auth: Authorization: Bearer (your session token after sign-in)

  • Authorization
    headerstringrequired

    Your aaas.market API key

    • Bearer YOUR_JWT_TOKEN
  • Content-Type
    headerstringrequired
    • application/json
Request · curl
curl -X POST "https://aaas.market/api/public-api/generate-key/" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 201
{
  "api_key": "upvc_1234567890abcdef1234567890abcdef",
  "created_at": "2024-12-25T10:30:00Z",
  "message": "API key generated successfully"
}

Errors

  • 400API key already exists
    Error 400
    {
      "detail": "You already have an active API key. Please use the existing key or delete it first."
    }
  • 401Authentication failed
    Error 401
    {
      "detail": "User authentication required"
    }
GETlist-keys/

List API Keys

Returns the active API key metadata for the authenticated user. Requires JWT Bearer token.

Auth: Authorization: Bearer (your session token after sign-in)

  • Authorization
    headerstringrequired

    Your aaas.market API key

    • Bearer YOUR_JWT_TOKEN
Request · curl
curl -X GET "https://aaas.market/api/public-api/list-keys/" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Response 200
{
  "success": true,
  "keys": [
    {
      "id": 1,
      "name": null,
      "key_preview": "a1b2c3d4...ef12",
      "is_active": true,
      "is_expired": false,
      "created_at": "2024-12-25T10:30:00Z",
      "last_used_at": "2024-12-26T14:00:00Z",
      "expires_at": null
    }
  ],
  "count": 1
}

Errors

  • 401Authentication failed
    Error 401
    {
      "success": false,
      "error": "Authentication required. Please provide a valid JWT token in Authorization header."
    }