Generate text
To generate text you need a premise ID and a dictionary containing keys that are the the required fields for the premise fields and values that contain the actual data.
Here is a basic example for a sentence premise where the required datapoints would have been [' first_name', 'person_description'].
If you do not know the required fields for your premise ID use the get premise endpoint.
If you receive an empty sentence back this is likely due to an error in your variables. Make sure to check the required fields and try again. All generations will contain meta data on the request.
Generate text for personalizing contacts or for generating entire emails.
POST
https://app.copyfactory.io/api/v2/generate/
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Your Copyfactory API key |
Request Body
Name | Type | Description |
---|---|---|
premise_id* | int | The ID of the sentence premise you wish to use. |
variables* | object | A dictionary with keys containing the required data fields and values which contain the actual contact data. |
Last updated