> For the complete documentation index, see [llms.txt](https://docs.autocontentapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autocontentapi.com/code-samples/data-tables/from-text.md).

# C\#

```csharp
using System.Net.Http.Headers;
using System.Text;

var token = Environment.GetEnvironmentVariable("AUTOCONTENT_TOKEN") ?? "YOUR_API_TOKEN";
var endpoint = "https://api.autocontentapi.com/content/Create";

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, endpoint);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
request.Content = new StringContent("""
{
  "outputType": "datatable",
  "resources": [
    {
      "type": "text",
      "content": "Company A raised $12M in Series A funding in Spain. Company B raised $35M in Series B funding in France."
    }
  ],
  "text": "Create columns for company, country, funding stage, funding amount, and positioning notes."
}
""", Encoding.UTF8, "application/json");

using var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();

if (!response.IsSuccessStatusCode)
{
    throw new Exception($"Request failed: {(int)response.StatusCode} {response.ReasonPhrase}\n{body}");
}

Console.WriteLine(body);
```
