> ## Documentation Index
> Fetch the complete documentation index at: https://dev.kloo.li/llms.txt
> Use this file to discover all available pages before exploring further.

# Create

> Splash pages — Create. `POST /splash-pages`

Interactive playground for `POST /splash-pages`.

<Tip>
  Paste your API key in the Authorization field as `Bearer {api_key}`.
</Tip>

<RequestExample dropdown>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.kloo.li/v1/splash-pages' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data 'example=value'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.kloo.li/v1/splash-pages', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer {api_key}',
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    body: 'example=value'
  });
  const data = await response.json();
  console.log(data);
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.kloo.li/v1/splash-pages', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer {api_key}',
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    body: 'example=value'
  });
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = 'https://api.kloo.li/v1/splash-pages'
  headers = {'Authorization': 'Bearer {api_key}'}
  data = {'example': 'value'}
  response = requests.request('POST', url, headers=headers, data=data)
  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://api.kloo.li/v1/splash-pages');
  curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer {api_key}'],
    CURLOPT_POSTFIELDS => http_build_query(['example' => 'value']),
  ]);
  echo curl_exec($ch);
  curl_close($ch);
  ```

  ```go Go theme={null}
  package main

  import (
    "fmt"
    "io"
    "net/http"
    "strings"
  )

  func main() {
    body := strings.NewReader("example=value")
    req, _ := http.NewRequest("POST", "https://api.kloo.li/v1/splash-pages", body)
    req.Header.Set("Authorization", "Bearer {api_key}")
    req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    data, _ := io.ReadAll(res.Body)
    fmt.Println(string(data))
  }
  ```

  ```java Java theme={null}
  HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.kloo.li/v1/splash-pages"))
    .header("Authorization", "Bearer {api_key}")
    .method("POST", HttpRequest.BodyPublishers.ofString("example=value"))
    .build();
  HttpResponse<String> response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());
  System.out.println(response.body());
  ```

  ```csharp C# theme={null}
  using var client = new HttpClient();
  client.DefaultRequestHeaders.Add("Authorization", "Bearer {api_key}");
  var content = new FormUrlEncodedContent(new Dictionary<string, string> { { "example", "value" } });
  var request = new HttpRequestMessage(HttpMethod.Post, "https://api.kloo.li/v1/splash-pages") { Content = content };
  var response = await client.SendAsync(request);
  Console.WriteLine(await response.Content.ReadAsStringAsync());
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'uri'

  uri = URI('https://api.kloo.li/v1/splash-pages')
  req = Net::HTTP::Post.new(uri)
  req['Authorization'] = 'Bearer {api_key}'
  req.set_form_data('example' => 'value')
  res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
  puts res.body
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "id": 1
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi.yaml POST /splash-pages
openapi: 3.0.3
info:
  title: Kloo Public API
  version: 1.0.0
  description: User API for Kloo — short links, QR codes, domains, teams, analytics.
servers:
  - url: https://api.kloo.li/v1
security:
  - bearerAuth: []
paths:
  /splash-pages:
    post:
      tags:
        - Splash pages
      summary: Create (splash-pages)
      operationId: splash_pages_create_post_splash_pages
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: name
                title:
                  type: string
                  description: title
                logo:
                  type: string
                  format: binary
                  description: logo
                favicon:
                  type: string
                  format: binary
                  description: favicon
                opengraph:
                  type: string
                  format: binary
                  description: opengraph
                description:
                  type: string
                  description: description
                secondary_button_name:
                  type: string
                  description: secondary_button_name
                secondary_button_url:
                  type: string
                  description: secondary_button_url
                custom_css:
                  type: string
                  description: custom_css
                custom_js:
                  type: string
                  description: custom_js
                ads_header:
                  type: string
                  description: ads_header
                ads_footer:
                  type: string
                  description: ads_footer
                link_unlock_seconds:
                  type: integer
                  description: link_unlock_seconds
                auto_redirect:
                  type: boolean
                  description: auto_redirect
              required:
                - name
      responses:
        '200':
          description: Success
        '201':
          description: Created
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '429':
          description: Rate limit
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: '{api_key}'
      x-default: '{api_key}'
      description: >-
        Get your API key at https://kloo.li/account-api. Use `Authorization:
        Bearer {api_key}`.

````