Skip to main content
POST
/
v1
/
links
/
bulk
curl -X POST https://api.bouncy.ai/v1/links/bulk \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "links": [
      {
        "url": "https://example.com/page1",
        "slug": "page1",
        "title": "Page 1",
        "tags": ["bulk", "test"]
      },
      {
        "url": "https://example.com/page2",
        "slug": "page2",
        "title": "Page 2",
        "tags": ["bulk", "test"]
      },
      {
        "url": "https://example.com/page3",
        "slug": "page3",
        "title": "Page 3",
        "tags": ["bulk", "test"]
      }
    ]
  }'
const response = await fetch('https://api.bouncy.ai/v1/links/bulk', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    links: [
      {
        url: 'https://example.com/page1',
        slug: 'page1',
        title: 'Page 1',
        tags: ['bulk', 'test']
      },
      {
        url: 'https://example.com/page2',
        slug: 'page2',
        title: 'Page 2',
        tags: ['bulk', 'test']
      },
      {
        url: 'https://example.com/page3',
        slug: 'page3',
        title: 'Page 3',
        tags: ['bulk', 'test']
      }
    ]
  })
});

const result = await response.json();
console.log(`Created ${result.summary.succeeded} links, ${result.summary.failed} failed`);
import requests

response = requests.post(
    'https://api.bouncy.ai/v1/links/bulk',
    headers={
        'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'links': [
            {
                'url': 'https://example.com/page1',
                'slug': 'page1',
                'title': 'Page 1',
                'tags': ['bulk', 'test']
            },
            {
                'url': 'https://example.com/page2',
                'slug': 'page2',
                'title': 'Page 2',
                'tags': ['bulk', 'test']
            },
            {
                'url': 'https://example.com/page3',
                'slug': 'page3',
                'title': 'Page 3',
                'tags': ['bulk', 'test']
            }
        ]
    }
)

result = response.json()
print(f"Created {result['summary']['succeeded']} links, {result['summary']['failed']} failed")
{
  "created": [
    {
      "id": "link_abc123",
      "shortUrl": "https://bouncy.ai/page1",
      "slug": "page1",
      "destination": "https://example.com/page1",
      "title": "Page 1",
      "tags": ["bulk", "test"]
    },
    {
      "id": "link_def456",
      "shortUrl": "https://bouncy.ai/page2",
      "slug": "page2",
      "destination": "https://example.com/page2",
      "title": "Page 2",
      "tags": ["bulk", "test"]
    }
  ],
  "failed": [
    {
      "index": 2,
      "slug": "page3",
      "error": {
        "code": "slug_already_exists",
        "message": "The slug 'page3' is already in use"
      }
    }
  ],
  "summary": {
    "total": 3,
    "succeeded": 2,
    "failed": 1
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "links array is required"
  }
}
{
  "error": {
    "code": "too_many_links",
    "message": "Maximum 100 links allowed per request. You provided 150."
  }
}

Request

Headers

Content-Type
string
required
Must be application/json

Body

Array of link objects to create (max: 100)Each link object can contain the same fields as the single create endpoint:
  • url (required) - Destination URL
  • slug (optional) - Custom slug
  • title (optional) - Link title
  • description (optional) - Link description
  • tags (optional) - Array of tags
  • domain (optional) - Custom domain

Response

created
array
Array of successfully created link objects
failed
array
Array of failed link attempts with error details
summary
object
Summary counts
curl -X POST https://api.bouncy.ai/v1/links/bulk \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "links": [
      {
        "url": "https://example.com/page1",
        "slug": "page1",
        "title": "Page 1",
        "tags": ["bulk", "test"]
      },
      {
        "url": "https://example.com/page2",
        "slug": "page2",
        "title": "Page 2",
        "tags": ["bulk", "test"]
      },
      {
        "url": "https://example.com/page3",
        "slug": "page3",
        "title": "Page 3",
        "tags": ["bulk", "test"]
      }
    ]
  }'
const response = await fetch('https://api.bouncy.ai/v1/links/bulk', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    links: [
      {
        url: 'https://example.com/page1',
        slug: 'page1',
        title: 'Page 1',
        tags: ['bulk', 'test']
      },
      {
        url: 'https://example.com/page2',
        slug: 'page2',
        title: 'Page 2',
        tags: ['bulk', 'test']
      },
      {
        url: 'https://example.com/page3',
        slug: 'page3',
        title: 'Page 3',
        tags: ['bulk', 'test']
      }
    ]
  })
});

const result = await response.json();
console.log(`Created ${result.summary.succeeded} links, ${result.summary.failed} failed`);
import requests

response = requests.post(
    'https://api.bouncy.ai/v1/links/bulk',
    headers={
        'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'links': [
            {
                'url': 'https://example.com/page1',
                'slug': 'page1',
                'title': 'Page 1',
                'tags': ['bulk', 'test']
            },
            {
                'url': 'https://example.com/page2',
                'slug': 'page2',
                'title': 'Page 2',
                'tags': ['bulk', 'test']
            },
            {
                'url': 'https://example.com/page3',
                'slug': 'page3',
                'title': 'Page 3',
                'tags': ['bulk', 'test']
            }
        ]
    }
)

result = response.json()
print(f"Created {result['summary']['succeeded']} links, {result['summary']['failed']} failed")
{
  "created": [
    {
      "id": "link_abc123",
      "shortUrl": "https://bouncy.ai/page1",
      "slug": "page1",
      "destination": "https://example.com/page1",
      "title": "Page 1",
      "tags": ["bulk", "test"]
    },
    {
      "id": "link_def456",
      "shortUrl": "https://bouncy.ai/page2",
      "slug": "page2",
      "destination": "https://example.com/page2",
      "title": "Page 2",
      "tags": ["bulk", "test"]
    }
  ],
  "failed": [
    {
      "index": 2,
      "slug": "page3",
      "error": {
        "code": "slug_already_exists",
        "message": "The slug 'page3' is already in use"
      }
    }
  ],
  "summary": {
    "total": 3,
    "succeeded": 2,
    "failed": 1
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "links array is required"
  }
}
{
  "error": {
    "code": "too_many_links",
    "message": "Maximum 100 links allowed per request. You provided 150."
  }
}