API Documentation

for the geeks!

X Clone provides a set of powerful APIs to interact with Twitter, manage personas, schedule tweets, and more. Below is a detailed guide to all available endpoints.


Authentication

Authenticate your API keys to enable X Clone functionalities.

  • Endpoint: /auth

  • Method: POST

  • Headers:

    • Content-Type: application/json

  • Request Body:

  • Response:

    • 200 OK:

    • 400 Bad Request:


Post a Tweet

Post a tweet directly from X Clone.

  • Endpoint: /post_tweet

  • Method: POST

  • Headers:

    • Content-Type: application/json

  • Request Body:

  • Response:

    • 200 OK:

    • 400 Bad Request:


Get Scheduled Tweets

Retrieve all scheduled tweets.

  • Endpoint: /scheduled_tweets

  • Method: GET

  • Response:

    • 200 OK:


Schedule a Tweet

Schedule a tweet to be posted at a specific time.

  • Endpoint: /schedule_tweet

  • Method: POST

  • Headers:

    • Content-Type: application/json

  • Request Body:

  • Response:

    • 200 OK:

    • 400 Bad Request:


Delete a Scheduled Tweet

Remove a tweet from the schedule.

  • Endpoint: /delete_scheduled_tweet/{id}

  • Method: DELETE

  • Path Parameter:

    • id: The ID of the scheduled tweet to delete.

  • Response:

    • 200 OK:

    • 404 Not Found:


Generate Text for Tweets

Use OpenAI to generate tweet content based on a prompt.

  • Endpoint: /generate_text

  • Method: POST

  • Headers:

    • Content-Type: application/json

  • Request Body:

  • Response:

    • 200 OK:

    • 400 Bad Request:


Create a Persona

Define a new persona for X Clone.

  • Endpoint: /create_persona

  • Method: POST

  • Headers:

    • Content-Type: application/json

  • Request Body:

  • Response:

    • 200 OK:


Get All Personas

Retrieve all existing personas.

  • Endpoint: /personas

  • Method: GET

  • Response:

    • 200 OK:


Delete a Persona

Remove a persona from X Clone.

  • Endpoint: /delete_persona/{id}

  • Method: DELETE

  • Path Parameter:

    • id: The ID of the persona to delete.

  • Response:

    • 200 OK:

    • 404 Not Found:

Last updated