Chastity Tracker API Documentation: Insert live session

  1. πŸ” Authentication

    All API requests must be authenticated via https using a bearer token.

    Generating a Token

    • Users can generate a secure API token from their profile page.
    • Tokens are shown only once and must be stored securely.
    • Only hashed versions are stored on the server.

    Usage

    URL

    https://www.chastitytracker.org

    HEADER

    GET /api/sesinsert.php HTTP/2
    Host: www.chastitytracker.org
    Authorization: Bearer {YOUR_API_TOKEN}
  2. πŸ“Œ Endpoint: POST /api/sesinsert.php

    PAST SESSION:

    Insert a new chastity session. Requires a valid authentication token (with write permission) and parameter(s) via json body (underlined means mandatory).

    Parameters

    • inserts: 1
    • startdate: YYYY-MM-DD
    • starttime: HH:MM (default 00:00)
    • enddate: YYYY-MM-DD
    • endtime: HH:MM (default 00:00)
    • public: 0/1 to make session public or not
    • lockedby: string

    Example Request

    POST /api/sesinsert.php HTTP/2
    Host: www.chastitytracker.org
    Authorization: Bearer {YOUR_API_TOKEN}
    Content-Type: application/json

    {
      "inserts":1,
      "startdate":"2025-05-01",
      "starttime":"07:30",
      "enddate":"2025-05-26"
    }

    Response

    {
      "message":"Session created succesfully",
      "session_id":1234
    }
  3. Status Codes

  4. ⚠️ Security Notes

    • Tokens must be stored securely by third parties.
    • Users can revoke or regenerate tokens at any time.
    • Never share a user’s token or sensitive info.
  5. πŸ“… Changelog

    • 2025-06-06: Initial public API version released

To go back to documentation index click here.